#include "colors.inc" // Last edited on 2010-10-15 14:51:39 by stolfilocal // Simulation of the 16lights experiment of 2010-10-12-130026. // Target: white funny-pool ball. // Gauges: stick-gauge, snook-gauge, 3 light-gauges // Stage: 50x50cm board stage, grid, velvet base disk. // Camera: Pike F-100 on rafa-rig with 35mm(?) lens. // LIGHTING PARAMETERS #include "light_data.inc" // COMPONENTS #include "ps16L_balls.inc" #include "ps16L_stick_gauge.inc" #include "ps16L_light_gauge.inc" #include "ps16L_snook_gauge.inc" #include "ps16L_stage.inc" #include "ps16L_velvet_base.inc" #include "ps16L_targets.inc" // DIMENSIONS AND POSITIONS OF SCENE OBJECTS // All measurements are in millimeters except where noted. // The origin for all scene coordinates is on the camera axis, at floor level. // XY coordinates of stage center: #declare STAGE_x = +2.2 ; #declare STAGE_y = -0.4 ; #declare STAGE_tilt = -1.32 ; // XY coordinates of velvet base: #declare VBAS_x = +2.0 ; #declare VBAS_y = -16.0 ; // XY coordinates of light-gauges and XY offsets of their baffles: #declare LGA_x = -150.7 ; #declare LGA_y = -3.3 ; #declare LGA_dx = +4.8 ; #declare LGA_dy = +4.5 ; #declare LGB_x = +14.0 ; #declare LGB_y = -147.2 ; #declare LGB_dx = +3.0 ; #declare LGB_dy = +1.9 ; #declare LGC_x = +133.1 ; #declare LGC_y = -23.9 ; #declare LGC_dx = -1.6 ; #declare LGC_dy = -0.7 ; // XY coordinates of snook-gauge: #declare NGA_x = -14.4 ; #declare NGA_y = +112.8 ; #declare NGA_dx = -0.9 ; #declare NGA_dy = +1.5 ; // XY coordinates of stick-gauge: #declare SGA_x = -78.7 ; #declare SGA_y = -94.2 ; // XY coordinates of white pool ball target: #declare TGA_x = +4.4 ; #declare TGA_y = -12.5 ; // CAMERA PARAMETERS #declare camera_angle = 15.990; // Width of camera field of view (degrees). #declare camera_height = 1630.0; // Height of camera pinhole from floor (millimeters). // Horizontal displacement of camera relative to the scene's Z axis: #declare camera_dx = +77.0; // Horizontal displacement (millimeters). #declare camera_dy = +140.0; // Vertical displacement (millimeters). #declare camera_position = < camera_dx, camera_dy, camera_height>; #declare camera_target = <0,0,0>; #declare noshadows = 0; camera { perspective location camera_position look_at camera_target angle camera_angle right -x sky y } // LIGHT SOURCES #macro create_lamp(lamp_dir,lamp_dist,lamp_color) light_source { camera_target + (lamp_dir*lamp_dist) color lamp_color fade_distance lamp_dist fade_power 2 #if (noshadows = 1) shadowless #end } #end // SCENE #declare obj_z = ST_height + VB_height; // Z of top of velvet base. #declare scene = union{ object{ stage rotate STAGE_tilt*z translate } object{ velvet_base translate } union{ object{ stick_gauge translate } object{ snook_gauge_on_base(NGA_dx,NGA_dy) translate } object{ light_gauge_in_baffle(LGA_dx,LGA_dy) translate } object{ light_gauge_in_baffle(LGB_dx,LGB_dy) translate } object{ light_gauge_in_baffle(LGC_dx,LGC_dy) translate } object{ target_funny_pool_ball_white translate } translate obj_z*z } } //render the scene object{scene} create_lamp(light_dir,light_dist,light_color) // box{ <0,0,-0.1> <1000,1000,0> texture{ pigment {Red} finish{ diffuse 0.8 ambient 0.2}} } // sphere{ <0, 500, 0> 30 texture{ pigment {Red} finish{ diffuse 0.8 ambient 0.2}} } // sphere{ <500, 0, 0> 30 texture{ pigment {Green} finish{ diffuse 0.8 ambient 0.2}} } // sphere{ <1000,500 , 0> 30 texture{ pigment {Blue} finish{ diffuse 0.8 ambient 0.2}} } // sphere{ <500, 1000, 0> 30 texture{ pigment {Yellow} finish{ diffuse 0.8 ambient 0.2}} }