#version 3.8; global_settings {assumed_gamma 1} #if (!defined(global.Cam)) #error "oops, run with 'declare=Cam=N' (N = 1-4)." #end #include "foreach.inc" #declare pts_ = array; #for (i_, 0, 9) #for (j_, 0, 9) #local pts_[dimension_size(pts_, 1)] = ; #end #end #macro _mkSphere(i_, elem_) sphere { elem_, .01 texture { pigment {color rgb y+z} finish {ambient 0 emission 1} } #debug concat("pt [",str(i_,0,0),"] <",vstr(3,elem_,",",0,0),">\n") } #end Foreach(pts_, dictionary {.Macro: "_mkSphere"}) #switch (Cam) #case (1) camera { location <4,-4,-12.5> right x * (4/3) up y look_at <4,-4,0> } #break #case (2) camera { location <4,-4,-12.5> right x * (4/3) up y angle 50 look_at <4,-4,0> } #break #case (3) camera { location <4,-4,-12.5> right x * (4/3) up y angle 60 look_at <4,-4,0> } #break #case (4) camera { location <4,-4,-12.5> right x * (4/3) up y angle 70 look_at <4,-4,0> } #break #else #error "oops, 'Cam' must be in range'1' to '4'." #end