We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › OCD: arc only arcs 180 degrees
Page Index Toggle Pages: 1
OCD: arc only arcs 180 degrees? (Read 599 times)
OCD: arc only arcs 180 degrees?
Dec 2nd, 2008, 10:33am
 
Hello

I'm using the awesome OCD library in:

http://www.personal.leeds.ac.uk/~gy06do/processing/ces_function/

Question: 'circle' allows the user to circle a full 2PI, and OCD kindly resets the value to 0 and carries on round.

For 'arc', however (holding down space and dragging, in the above example), the user can only go 180 degrees - 90 degrees up or down.

Now, clearly, I could find some workaround for this. I was just wondering if anyone knew a reason why this has to be so? I've been scratching my head and can't think of one. 'circle' just moves position relative to the y axis; 'arc' does the same for the x axis. (I use that fact to compensate in the above so the text faces the viewer.)

Is this something a later version of OCD might change? That is, allow full 2PI arcing?
Re: OCD: arc only arcs 180 degrees?
Reply #1 - Dec 8th, 2008, 1:54pm
 
think this has something to do with polar coordinates, with two angles ( theta and phi ) you can move to any point on a sphere, with a 2PI rotation around the Y axis and a PI rotation around the Z axis.  when you think about it, you only need to go up and down 180 degrees if you are going around 360 degrees, otherwise you'd be doubling up.

there are other ways of rotating around a sphere, such as quarternions... big topic... just getting my head around it myself. will post if i figure it out.
Re: OCD: arc only arcs 180 degrees?
Reply #2 - Dec 10th, 2008, 7:18pm
 
This issue has been raised before. The limitation is imposed because OCD represents rotations with Euler angles. As julapy mentions, quaternions would allow for the type of behavior you describe, but would require a rewriting of the OCD library.
Page Index Toggle Pages: 1