# What is the equation for a spiral path in 3D? [closed]

I am developing games in Unity 3D. Currently, I am trying to place 3D objects in 3D space in a spiral pattern that looks like one of 2 the strands in a pair of the DNA (helix) spiral pattern.

Would anyone please show me the equation for 3D spiral patterns, which should involve X, Y, and Z coordinate ?

Thanks.

• How is this a question about computer science? – David Richerby Jul 5 '18 at 16:43

I have just found this correct answer on the web (by someone else):

A helix is a circle that moves up with time. Hence, the equations for one helix are:

x(t) = sin t

y(t) = cos t

z(t) = t

A double helix include two helices that are offset by half a turn. So, the equations for the second helix would then be :

x(t) = sin t

y(t) = cos t

z(t) = t + \pi