Hi
I have made a torusknot using GL_LINE_STRIP, and now I would like to know how to make the line look like a tube, so the torusknot would look thick.
Thanks
Hi
I have made a torusknot using GL_LINE_STRIP, and now I would like to know how to make the line look like a tube, so the torusknot would look thick.
Thanks
ps i havent tried this but it should work
if your lines lay on a plane then take the cross product of the up vector and a line segment, normalize this and store it, then take the cross product of the up vector and - the up vector and store it then store the point + the up vector and the point- the up vector this will get you the points for a square at each line segment.
Joing these up will make a square tube.
If you want furthur vertices for the circle on that segment just substitute the values just found in the equation of a circle and get more points that way.
Another way is to use quadratics (i think there using the glaux library) just rotate and translate cylinders straight onto your lines easier but not yr own work
nice, although u cant claim you wrote it
Mr_Smith: I didn’t claim I wrote it.
tru, but its nice to know u wrote it