// Last edited on DATE TIME by USER // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare BLUE = texture { pigment { color rgb < 0.10, 0.20, 1.00 > } finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 } } #declare YELLOW = texture { pigment { color rgb < 1.0, 1.0, 0.0 > } finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 } } #declare GREEN = texture { pigment { color rgb < 0.20, 0.80, 0.10 > } finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 } } #declare RED = texture { pigment { color rgb < 1.00, 0.00, 0.00 > } finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 } } #declare SILVER = texture { pigment { color rgb < 0.86, 0.86, 0.86 > } finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 } } #declare GOLDENROD = texture { pigment { color rgb < 0.854, 0.64, 0.125 > } finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 } } #macro eye(r_eyeball, iris_ratio, iris_color) #declare r_iris = r_eyeball*iris_ratio; merge{ sphere{ <0,0,0>, r_eyeball pigment { color rgb < 1.0, 1.0, 1.0> } } sphere{ <0,-r_eyeball,0>, r_iris pigment { color rgb iris_color } } } #end #macro eyebrow(eb_width, eb_height, eb_depth, eyebrow_color) object{ box{ <0,0,0>, pigment{ color rgb eyebrow_color } } } #end #macro eye_region(r_eyeball, iris_ratio, iris_color, ebw, ebh, eyebrow_color, eb_theta, eb_ratio) union{ object{ eye(r_eyeball, iris_ratio, iris_color) } object{ eyebrow(ebw, ebh, r_eyeball/2, eyebrow_color) translate <-ebw/2,-r_eyeball/2,r_eyeball*eb_ratio> rotate <0, eb_theta, 0> } } #end #macro eyes(r_eyeball, iris_color, eyebrow_color, eb1_theta, eb2_theta, eye_space) #declare iris_ratio = 0.3; #declare eb1_ratio = 1.1; #declare eb2_ratio = 1.1; #declare ebw_ratio = 2; #declare ebh_ratio = 0.5; union{ object{ eye_region(r_eyeball, iris_ratio, iris_color, r_eyeball*ebw_ratio, r_eyeball*ebh_ratio, eyebrow_color, eb1_theta, eb1_ratio) translate <-eye_space/2, 0, 0> } object{ eye_region(r_eyeball, iris_ratio, iris_color, r_eyeball*ebw_ratio, r_eyeball*ebh_ratio, eyebrow_color, eb2_theta, eb2_ratio) translate } } #end #macro nose(nose_length, nose_radius, nose_color) object{ cone{ <0,0,0>,nose_radius <0,-nose_length,0>,0 } pigment { color rgb nose_color } } #end #macro ear(ear_radius, ear_depth, ear_color) object{ cylinder{ <0,0,0>, <0,-ear_depth, 0>, ear_radius } pigment { color rgb ear_color } } #end #macro face(head_size, mouth_width, mouth_height, mouth_depth, mouth_x, mouth_z, face_color) #declare head_size2 = head_size/2; difference{ box{ <-head_size2,-head_size2,-head_size2> } sphere{ <0,0,0>, 1.1*head_size2*sqrt(2) inverse } cylinder{ <0,-head_size, 0> <0, -head_size2+mouth_depth, 0> mouth_height scale translate } pigment{ color rgb face_color } } #end #macro face_image(head_size, mouth_width, mouth_height, mouth_depth, mouth_x, mouth_z, face_color) #declare head_size2 = head_size/2; difference{ box{ <-head_size2,-head_size2,-head_size2> } sphere{ <0,0,0>, 1.1*head_size2*sqrt(2) inverse } cylinder{ <0,-head_size, 0> <0, -head_size2+mouth_depth, 0> mouth_height scale translate } pigment{ image_map { jpeg "face_crianca.jpg"} scale translate <-head_size/2, -head_size/2, 0> rotate <90,0,0> } } #end #macro head(head_size, face_color, mouth_pwidth, mouth_pheight, mouth_pdepth mouth_px, mouth_pz, eye_ratio, eb1_theta, eb2_theta, eye_space, eye_z, iris_color, eyebrow_color, nose_length, nose_width, nose_x, nose_z, nose_color, ear_radius, ear_depth, ear1_y, ear1_z, ear2_y, ear2_z, ear_color) union{ object{ face(head_size, mouth_pwidth*head_size, mouth_pheight*head_size, mouth_pdepth*head_size, mouth_px*head_size, mouth_pz*head_size, face_color) } object{ eyes(eye_ratio*head_size, iris_color, eyebrow_color, eb1_theta, eb2_theta, eye_space*head_size) translate <0,-head_size/2,eye_z*head_size> } object{ nose(nose_length*head_size,nose_width*head_size, nose_color) translate } object{ ear(ear_radius*head_size, ear_depth*head_size, ear_color) translate <-head_size/2-ear_radius*head_size, ear1_y*head_size, ear1_z*head_size> } object{ ear(ear_radius*head_size, ear_depth*head_size, ear_color) translate } } #end #macro head_image(head_size, face_color, mouth_pwidth, mouth_pheight, mouth_pdepth mouth_px, mouth_pz, eye_ratio, eb1_theta, eb2_theta, eye_space, eye_z, iris_color, eyebrow_color, nose_length, nose_width, nose_x, nose_z, nose_color, ear_radius, ear_depth, ear1_y, ear1_z, ear2_y, ear2_z, ear_color) union{ object{ face_image(head_size, mouth_pwidth*head_size, mouth_pheight*head_size, mouth_pdepth*head_size, mouth_px*head_size, mouth_pz*head_size, face_color) } object{ eyes(eye_ratio*head_size, iris_color, eyebrow_color, eb1_theta, eb2_theta, eye_space*head_size) translate <0,-head_size/2,eye_z*head_size> } object{ nose(nose_length*head_size,nose_width*head_size, nose_color) translate } object{ ear(ear_radius*head_size, ear_depth*head_size, ear_color) translate <-head_size/2-ear_radius*head_size, ear1_y*head_size, ear1_z*head_size> } object{ ear(ear_radius*head_size, ear_depth*head_size, ear_color) translate } } #end #declare eye_ratio = 0.3; #declare iris_color = <0,0.5,0.5>; #declare eyebrow_color = <0,0,0>; #declare nose_color = < 0.854, 0.84, 0.125 >; #declare ear_color = < 0.854, 0.64, 0.225 >; #declare eb1_theta = 20; #declare eb2_theta = -20; #declare face_color = < 0.854, 0.64, 0.125 >; #declare head_size = 4; object{head(head_size, face_color, 0.3, 0.2, 0.15, 0, -0.3, 0.15, 10, -10, 0.4, 0.2, iris_color, eyebrow_color, 0.2, 0.1, 0, 0, nose_color, 0.2, 0.2, 0, 0, 0, 0, ear_color) } object{head(head_size, <1,1,1>, 0.3, 0.2, 0.15, 0, -0.3, 0.15, 10, -10, 0.4, 0.2, <1,1,1>, <1,1,1>, 0.2, 0.1, 0, 0, <1,1,1>, 0.2, 0.2, 0, 0, 0, 0, <1,1,1>) translate } object{head(4, <1,1,1>, 0.3, 0.2, 0.15, 0, -0.3, 0.15, 10, -10, 0.4, 0.2, <1,1,1>, <1,1,1>, 0.2, 0.1, 0, 0, <1,1,1>, 0.2, 0.2, 0, 0, 0, 0, <1,1,1>) translate <8, 0, 0> } object{head_image(4, <1,1,1>, 0.3, 0.2, 0.15, 0, -0.3, 0.15, 10, -10, 0.4, 0.2, <1,1,1>, <1,1,1>, 0.2, 0.1, 0, 0, <1,1,1>, 0.2, 0.2, 0, 0, 0, 0, <1,1,1>) translate <-head_size*2, 0, 0> } // Original camera parameters: // #local cam_ctr = <1.00,0.00,2.00> // #local cam_vec = (<0.0,-15,0.00>-<1.00,0.00,2.00>) // #local cam_sky = z #include "camlight.inc" camlight(<1.00,0.00,2.00>,<10,10,10>,20.0,z,1.0)