Gl.glPushMatrix() 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 Gl.glBegin(Gl.GL_LINE_STRIP) 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 'z = CSng(length) Gl.glVertex3d(x, y, z) Next Next Gl.glEnd() GL.glPopMatrix()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)