I attach here my version of a coil generator. It
doesn't compete with Chris Colfax's version
http://www.geocities.com/SiliconValley/Lakes/1434/otherincludes.html
(highly recommended), but is compact and is in #macro
form. Ron Parker has another version on his web page :
http://www2.fwi.com/~parkerr/traces.html
I also attach a macro form of some of John VanSickl's matrix formulas
for vector transformations... these are from his excellent
matrix tutorial :
http://www.erols.com/vansickl/matrix.htm
VectorAlign() is used in the coil macro.
Comments and suggestions are welcome.
Dan
P.S. Note that constructing coils out of
rotated half-toroids produces distorted coils,
with zero slope at the interfaces. So this macro
is intended for long-range views of the object.
Chris Colfax has a ball-and-stick solution. A better
approach might be to use multiple toroidal segments
per revolution. Ron does this in his macro, but
the implementation isn't quite right.
--
http://www.flash.net/~djconnel/
Post a reply to this message
Attachments:
Download 'toruscoil.inc.txt' (2 KB)
Download 'vectortransform.inc.txt' (2 KB)
|