I'm teaching myself computer graphics using Computer Graphics Through OpenGL by Sumanta Guha. I seem to have hit a small blocker when it comes to one of the exercises.
It asks the reader to "plump" a Toroidal Helix with n coils. By this, it means to render a 3D pipe in the shape of a toroidal helix that loops around n times. I was able to devise the parametric equations for the toroidal helix curve, but am having trouble with the maths to solve for the parametric equations of the 3D pipe.
The parametric equations for a toroidal helix curve is as follows:
The torus being wrapped around has inner radius (the hole in the centre of the "doughnut") R and outer radius r.
Given a parameter t, on the range [-PI, PI]
x = (R + r*cos(n*t)) * cos(t)
y = (R + r*cos(n*t)) * sin(t)
z = r*sin(n*t)
Obviously we will need another parameter and another radius for the actual pipe.
Any ideas on how to start solving this problem? I've banged my head against it a little and haven't been able to.
Thanks!