Page 1 of 1

Angle Control

Posted: November 17th, 2011, 6:07 am
by blindchild
Hi,

My college math is failing me.

I would like to convert the angle control value so that:
0°-90° = 0-100
90°-180° = 100-0
180°-270° = 0-100
270°-360° = 100-0
360°-450° = 0-100.....
...and so on. I would like the angle controller to be able to beyond 1 rotation, ie. 2x+120° and beyond.

I remember vaguely there being cos and sin and tan involved. But I cannot at all remember how to work it out.

Can someone please school me?

Thank you.

Ross

Re: Angle Control

Posted: November 17th, 2011, 9:32 am
by Dan Ebberts
Something like this should work:

a = effect("Angle Control")("Angle")%180;
a < 90 ? linear(a,0,90,0,100) : linear(a,90,180,100,0)


Dan

Re: Angle Control

Posted: November 22nd, 2011, 1:29 pm
by blindchild
Thanks Dan, that worked perfectly! :-)