/* ****************************************************************************** * POV-Ray script * General scene description + variables + macros * * Author : Nicolas Calimet * Web site : http://pov4grasp.free.fr * Last revision: October 12, 2000 ****************************************************************************** */ #version 3.1; // view settings #declare SYSTEM = -1; // left|right-handed coordinates system (1|-1) #declare ORTHO = 0; // orthogonal|perspective projection (1|0) #declare CORR = 1; // perspective correction (1|0) #declare RATIO = 352/288; // image ratio x/y #declare DIST = 100; // camera distance from center (>0) #declare SIZE = 68; // window width in x units (i.e. at y=0) // misc #declare BGCOL = 0.0; // background color //============================================================================ // perspective correction before translation #macro correct_translate(xx,yy,zz) #if(!ORTHO & CORR) #local xrot = -SYSTEM*degrees(atan2(yy,DIST)); #local yrot = SYSTEM*degrees(atan2(xx,DIST)); rotate #end translate #end //============================================================================ global_settings { ambient_light 0.01 max_trace_level 20 } // camera settings #declare CAMLOC = -SYSTEM*DIST*z; camera { #if(ORTHO) orthographic right SIZE*SYSTEM*x up SIZE*y/RATIO #else #declare ANGLE = 2 * degrees(atan2(SIZE/2, DIST)); #render concat("\nLens opening is ",str(ANGLE,0,3)," degrees\n") right SYSTEM*x up y/RATIO angle ANGLE #end location CAMLOC look_at <0,0,0> } // ambient, gray front light source that cast no shadows light_source { CAMLOC color rgb 0.66 shadowless } // right light source that cast shadows light_source { -SYSTEM*z*300 color rgb 1.0 rotate } // needs some explanation ? background { color rgb BGCOL }