#include "colors.inc" background { White } light_source { <0,0,5> 1 } camera { orthographic angle 20 location <0,0,5> look_at <0, 0, 0> sky<0,0,1> // z up right<-4/3,0,0> // right-handed coordinate system } #macro yinyang( flipped, rotation, translation, booger ) #local n1 = 100; #local n2 = 100; #local a = pi; #local maxr = sqrt(pi)/a; polygon { n1+n2+2, // Fermat's spiral boundary #local i=0; #while( i<=n1 ) #local r = maxr*(2*i/n1 - 1); #local theta = a*a*r*r; #local i=i+1; #end // Outer circle boundary #local r = maxr; #local thetaStart = a*a*maxr*maxr; #local i=0; #while( i<=n2 ) #local theta = thetaStart + radians(i*180/n2); #local i=i+1; #end // Symmetries scale( x*flipped ) rotate( z*rotation ) translate( z*translation ) pigment { rgbt<0,0,0,booger> } } #end // Disk boundary torus { sqrt(pi)/pi, .005 rotate( x*90 ) } yinyang( 1, 0, 0, .4 ) yinyang( -1, clock*360, .1, .8 )