A helical path

Can someone help me out? I have to make an object move along a helical path, prefereably around the Y axis. Can someone give me the code fragment that will let me do this in terms of glTranslated(x,y,z) ?
Be very much appreciated.

(updated)

I’m not sure what you mean, but if you are discribing a spring-like path (use smaller words, I’m stupid), try this:

glTranslated(sin(var*spinspeed)*size+x_offset,cos(var/spinspeed)size+y_offset,varrise_speed+z_offset);

var: % of path
spinspeed: speed of revolution (negetive values for the other direction)
size: radius of path(negetive reverses turn direction)
rise_speed: speed it rises (negetive values make things fall down.)
x_offset,y_offset,z_offset: offset to position

you need math.h I think and you will probably want to use a sine and cosine table. Remove what you don’t need, and you will likely need to swap the axises. (I use x,y,z, but opengl uses x,z,y I think.)

I hope that is helpful, but I doubt it. Good luck. This is as much as I can do with grade 10 math.

–Smart_idiot

PS

I want to know it I actually helped anybody so let me know it this it helped you.

I’m canadian, eh?

[This message has been edited by smart_idiot (edited 11-03-2000).]

The equation for plotting a helix is (cos(t), sin(t), bt) where t is some changing value (ie. a for loop variable) and b is some constant for the “height” displacement of the helix.

Sorry, I was close.

I think that mine will just be rotated by 90 degrees.

I won’t hinder anyone else with false information again. (until monday)

I was just trying to help.