Grasshopper

algorithmic modeling for Rhino

I have a number slider ... 

When I change the value of this number slider, I need a function, that creates me 0 and 1 and again and again ... every time the slider moves 0.05 I need to generate this ...

for example:

slider is 0.6 ==> 0

slider is 0.65 ==> 1

slider is 0.7 ==> 0

Views: 366

Replies to This Discussion

There must be a nice way of doing this ... Because 0 and 1 are important! :)

EDIT: A function maybe, that takes the slider value and gives in every 0.05 or whatever change in the slider value an output of 0 or 1 ... like 0,1,0,1,0,1,0,1,0,1,0?

EDIT: There must be a way, because:
If(x=0.84,0,(If(x=0.85,1,If(x=0.86,0,If(x=0.87,1,If(x=0.88,0,If(x=0.89,1,If(x=0.9,0,If(x=0.91,1,If(x=0.92,0,If(x=0.93,1,If(x=0.94,0,If(x=0.95,1,If(x=0.96,0,If(x=0.97,1,If(x=0.98,0,If(x=0.99,1,If(x=1,0,""))))))))))))))))) is not working the way it should^^

Every Change of 4/31 in the number slider should cause a change of the output, that only gives 0 or 1 ...

Ok, the real thing is, that I want to make 125 Frames from 0 to 124 ...

The slider intervall is from 0.84 to 1.00 or let's say multiplied with 100 ==> from 84 to 100 ...

So the step will be 4/13 and the number slider is going to take these values:

84

84.129032
84.258065
84.387097
84.516129
84.645161
84.774194
84.903226
85.032258
85.16129
85.290323
85.419355
85.548387
85.677419
85.806452
85.935484
86.064516
86.193548
86.322581
86.451613
86.580645
86.709677
86.83871
86.967742
87.096774
87.225806
87.354839
87.483871
87.612903
87.741935
87.870968
88.0
88.129032
88.258065
88.387097
88.516129
88.645161
88.774194
88.903226
89.032258
89.16129
89.290323
89.419355
89.548387
89.677419
89.806452
89.935484
90.064516
90.193548
90.322581
90.451613
90.580645
90.709677
90.83871
90.967742
91.096774
91.225806
91.354839
91.483871
91.612903
91.741935
91.870968
92.0
92.129032
92.258065
92.387097
92.516129
92.645161
92.774194
92.903226
93.032258
93.16129
93.290323
93.419355
93.548387
93.677419
93.806452
93.935484
94.064516
94.193548
94.322581
94.451613
94.580645
94.709677
94.83871
94.967742
95.096774
95.225806
95.354839
95.483871
95.612903
95.741935
95.870968
96.0
96.129032
96.258065
96.387097
96.516129
96.645161
96.774194
96.903226
97.032258
97.16129
97.290323
97.419355
97.548387
97.677419
97.806452
97.935484
98.064516
98.193548
98.322581
98.451613
98.580645
98.709677
98.83871
98.967742
99.096774
99.225806
99.354839
99.483871
99.612903
99.741935
99.870968
100.0

divided by 100, but that's not the big deal ... The big deal is:

at every frame I need to have a different colour for a specific object... How to do this?!

When the slider value is any of the list A of the Dispatch component, I need ZERO

When the slider value is any of the list B of the Dispatch component, I need ONE

EDIT: Is there a component, that can test for me, if the value of x is in the list A or in the list B and give me, if the x value is in A ==> ZERO or if the x value is in B ==> ONE?!

Something like ... hmmm ... search list?! :D

Got it somehow

EDIT:

kaka!

EDIT:

Not that much though hehe^^

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