#include "stdinc.inc" #include "glass.inc" #include "colors.inc" #include "textures.inc" /* ****************************************************************************** * Pov4Grasp script * General scene description + variables + macros * * Author : Nicolas Calimet * Web site : http://pov4grasp.free.fr * Last revision: October 24, 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 = 320/240; // x/y image ratio #declare DIST = 15; // camera distance from world center (>0) #declare SIZE = 25; // window width in x units (i.e. at z=0) // misc #declare BGCOL = 0; // background color #declare FLOOR = -15.0; // floor y coordinate //============================================================================ // 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 { assumed_gamma 2.2 } // camera settings #declare CAMLOC = -SYSTEM*DIST*z + -SYSTEM*8.5*y; #declare LIGHTLOC = CAMLOC; 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,9,0> } // ambient, gray front light source that cast no shadows light_source{<1500,2500,-2500> color White} // right light source that cast shadows light_source { LIGHTLOC color rgb 1.0 area_light <5,0,0>, <0,5,0>, 5, 5 jitter rotate } //sun light light_source{<1500,2500,2500> color White area_light <5,0,-5>, <0,5,-5>, 5, 5 jitter} // needs some explanation ? background { color SummerSky } //sky plane {<0,1,0>,1 hollow // texture { pigment { color rgb <0.2,0.5,0.9>} finish {ambient 1 diffuse 0}} texture { pigment { bozo turbulence 0.65 octaves 6 omega 0.7 lambda 2 color_map { [0.0 color rgb <0.95,0.95,0.95>] [0.1 color rgb <0.85,0.85,0.85>] [0.5 color rgbt <1,1,1,1>] [1.0 color rgbt <1,1,1,1>] } rotate <10,20,0> scale <0.3, 0.4, 0.2> } finish {ambient 1 diffuse 0} } scale 10000} // fog at the horizon fog {distance 300000 color White} isosurface { function { y - f_noise3d(x,0,4*z/1.44)/10 - sin(1.2*x)/16 + 0.125*z } max_gradient 2 contained_by { box { -80, 80} } texture { finish {F_Glass9} } } #declare mol=union { #include "backbone.povinc" } object { mol scale 0.3 translate <5,10,-5> rotate <10,0,30> }