/* t_coil_example.pov The t_coil macro constructs a helix from sect- ions of tori. The goal is to have a relatively fast-rendering, easy-to-use coil for general- purpose modeling. I optimized the routines, so the parsing is very snappy (POV hardly blinked at 1000 turns). There are two versions: regular and solid. The solid version can be used in CSG operations, but will render much more slowly than the reg- ular version. To model a bolt or auger, you could use t_coil_solid to cut grooves into a cylinder. The regular version can be used with transpar- ency and media without any problems. Its invocation is like a mix between a cylinder and a torus. The result will follow a cylinder, with the minor radius extending from the major radius. The macros: t_coil( ptA, ptB, rad1, rad2, nwnd ) t_coil_solid( ptA, ptB, rad1, rad2, nwnd ) * ptA = starting point * ptB = ending point * rad1 = major radius * rad2 = minor radius, the wire's width * nwnd = number of windings Since the object is constructed from torus sections, it will not match up with a geo- metrically accurate helix. In most cases, it would not really matter. */ // example #include "t_coil.inc" object{ t_coil( <0,-1,0>, <0,1,0>, 0.5, 0.05, 5 ) pigment{rgb x} } // ~example camera{ location <3,8,-10> look_at 0 angle 17 } light_source{ <.5,1,-.3>*100000, 1.5 } plane{ y, -1.05 pigment{ checker rgb .85, rgb 1 translate .5 scale .5 } }