I am trying to create a 3D spring (helix, Spiral, ...) with a specific length and number of turns. I have the code written to create a spring using a line_strip, but I want to extend it to be an actual 3d surface (look like a real spring on a car). I figure this can be done using a quad_strip, but not sure what the best way to create this is.
Has someone done this?
Gl.glColor4f(0, 0.28, 0.48, Alpha)
Dim length As Double = glVectorRotation(point1, point2, False)
Dim coils As Integer = 5
Dim segs As Integer = 100
Dim Radius As Single = 2.5
Dim pitch As Double = length / coils
For icoil As Integer = 0 To coils
For iseg As Integer = 0 To segs
Dim theta As Single = CSng((2 * PI) / segs * iseg)
Dim z As Single = CSng((icoil + (iseg / segs)) * pitch)
Dim x As Single = CSng(Radius * Cos(theta))
Dim y As Single = CSng(Radius * Sin(theta))
If z > length Then Exit For Gl.glVertex3d(x, y, z)