Advertisement

plotting a path

Started by March 22, 2001 12:56 PM
1 comment, last by scoops 23 years, 8 months ago
i''m trying to plot a path for an object to track along in my GLDrawScene using the following parametric functions // x = RADIUS * (cos(t) + t*sin(t)) // y = RADIUS * (sin(t) - t*cos(t)) thus far all my stabs have been wrong, anyone done anything like this before? jeremy übergeek jeremy@imc2.com
jeremyübergeekjeremy@imc2.com
It looks like you want to draw a circle , right ?
then the correct equations are :
x=radiusx*cos(t)-radiusy*sin(t)+x0;
y=radiusx*sin(t)+radiusy*cos(t)+y0;

note that if radiusx=radiusy you are drawing a circle
x0,y0 is the centre

hope this helps

Advertisement
actually, it''s a spiral... and i''m not really drawing it i''m moving a series of object along it... I think i can use your code there, I''ll take a look, thanks

jeremyübergeekjeremy@imc2.com

This topic is closed to new replies.

Advertisement