#include "colors.inc" #declare sceneScale = 100; background { rgb <0,.25,.5> } global_settings { assumed_gamma 1.5 } camera { location <1.5,1,2>*2.5*sceneScale look_at <0, 0, 0> sky <0,0,1> // z up right <-4/3,0,0> // right-handed coordinate system } // // Macros we need // // This maps points from the plane onto a sphere. // From "Visual Complex Analysis" #macro planeToSphere( pp ) #local t1 = 1 + vdot( pp, pp ); #local t2 = vdot( pp, pp ); #local ret = < 2*pp.x / t1, 2*pp.y / t1, ( t2 - 1 ) / ( t2 + 1 ) >; ret*sceneScale #end // This is our setup of doing an exponential spiral. #macro tempFn( i ) #local windingRate = 20; #local beta = windingRate*pi*i/180; #local M = ; #local M = M * exp( (i-(numSegments/2))/25 ); planeToSphere( M ) #end #macro loxodrome() #local numSegments = 350; #local segradius = .015*sceneScale; sphere_sweep { cubic_spline numSegments+1, #local i=0; #while( i } finish { specular .4 } no_shadow } light_source { <0,0,(1-.016)*sceneScale> color White // The slight offset is so we are never inside the loxodrome sphere sweep. //<0,0,sceneScale> color White looks_like { sphere { <0,0,0>,0.1*sceneScale pigment { rgbt<1,1,1,.99> } finish { ambient 1 specular .5 } } } } loxodrome()