|
|
Hi all.. Just creeping in with a little addition to the to wireframe_torus
that was posted before. Drove me nuts, until i remembered to convert to
radians. :-} Getting old...
#include "colors.inc"
background{ DimGray }
camera{ location <100, 200, 300> look_at <0, 0, 0> }
light_source{ 0 color White shadowless}
light_source{ 300 color White shadowless}
#macro WireTorus( pMajor, pMinor, pWire, pMajorCnt, pMinorCnt )
#union
{
#local lAdjust = 360 / pMajorCnt;
#local lTemp = 0;
#while( lTemp < pMajorCnt )
#local lAngle = (lTemp * lAdjust);
#local lX = pMinor * cos( radians( lAngle ));
#local lY = pMinor * sin( radians( lAngle ));
torus
{
lY + pMajor, pWire
translate <0, lX, 0>
}
#local lTemp = lTemp + 1;
#end
#local lAdjust = 360 / pMinorCnt;
#local lTemp = 0;
#while( lTemp < pMinorCnt )
torus
{
pMinor, pWire
rotate <90, 0, 0>
translate <pMajor, 0, 0>
rotate <0, (lTemp * lAdjust), 0>
}
#local lTemp = lTemp + 1;
#end
}
#end
object{ WireTorus( 100, 25, 5, 5, 40 ) texture{ pigment{ Blue }}}
--
Hugh S. Steele
--
The light you see at the end of the tunnel
is from the train about to hit you.
Post a reply to this message
Attachments:
Download 'WireTorus.jpg' (18 KB)
Preview of image 'WireTorus.jpg'
|
|