Grasshopper

algorithmic modeling for Rhino

double tmp,tmp1,tmp2,r1,h1;
    int index = 0,i = 0;

    tmp1 = idea_v / 20;


    for(i = 0;i < 30;i++){
      index = i;
      tmp = vol - idea_v;
      tmp = Math.Abs(tmp);

      B = tmp;
      if(tmp <= tmp1){

        A = index;
        B = tmp;
      }



      tmp2 = vol / 2.137137859584893359498;
      h1 = Math.Pow(tmp2, -3.0);

      h1 = h1 + 1;
      r1 = h1 / 0.7;

      vol = (22 * r1 * r1 * h1 ) / 21;


    }

Views: 508

Replies to This Discussion

Hi Raja,

is there a question in there?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

i am getting a null value in the output A

A is in an if statement and will only be assigned it is true. 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service