plotting a path
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement