Setup—————-
Ok, my question is more of a general programming one but I’m doing it in javascript anyway (in max/msp so coreJS only but no matter…)
I have 3 variables:
[CODE]var angle a;// (0-360)
var angle b;//(0-360)
var angleinout; //(0/1)
these are meant to scribe any arc on a unit circle between two points. If the angle inout ==0 the arc goes CCwise from angleb and Cwise from angleA if its one, its the reverse.
Question———–
how do I test if the arc passes through a point? easy you say?? what happens if the arc passes 0 degrees??? I’ve tried for a day, I can’t get it.
Background— (I’m trying to draw a rectangle around the arc) In the end I’m trying to find the arcs minx,maxx,miny,and maxy values. so first I have to test to see if it hits the angles 0,90,180,270 then do some fancy minmax work. after that I’m drawing really cool curved slider which goes from any angle to any angle.
you guys rock
-matt