// Author: Karl Ostmo
// Date: 09/05/2010
// Version: 1.2
#include "colors.inc"
#include "textures.inc"
#declare camera_pos = 7;
#declare point_lightsource_pos = 20;
#declare spotlight_distance = 60;
#declare wall_spacing = 3;
#declare object_radius = 0.75;
#declare object_right_edge = wall_spacing - object_radius;
#declare wedge_slope = 0.5;
#declare first_wedge_plane_z_intercept = wall_spacing - wedge_slope*object_right_edge;
#declare first_wedge_plane_distance = first_wedge_plane_z_intercept / sqrt(wedge_slope*wedge_slope + 1);
#declare second_wedge_plane_z_intercept = wall_spacing + wedge_slope*object_right_edge;
#declare second_wedge_plane_distance = second_wedge_plane_z_intercept / sqrt(wedge_slope*wedge_slope + 1);
camera {
location camera_pos
look_at 0
}
difference {
intersection {
cylinder {
<wall_spacing - object_radius, wall_spacing, wall_spacing>, <wall_spacing + object_radius, wall_spacing, wall_spacing>, object_radius
}
plane {
<-1, 0, 1/wedge_slope>, first_wedge_plane_distance
}
}
plane {
<1, 0, 1/wedge_slope>, second_wedge_plane_distance
}
pigment {
Candy_Cane
scale 0.25
}
}
#declare planes = array[3] {x, y, z}
#declare lightsource_positions = array[3] {
<spotlight_distance, wall_spacing, wall_spacing>,
<wall_spacing, spotlight_distance, wall_spacing>,
<wall_spacing, wall_spacing, spotlight_distance>
}
#declare lightsource_targets = array[3] {
<0, wall_spacing, wall_spacing>,
<wall_spacing, 0, wall_spacing>,
<wall_spacing, wall_spacing, 0>
}
#declare lightsource_colors = array[3] {
Red,
Green,
Blue
}
#declare Index = 0;
#while(Index < 3)
light_source {
lightsource_positions[Index]
color White
spotlight
radius 1
falloff 2.5
point_at lightsource_targets[Index]
}
plane {
planes[Index], 0
pigment {
lightsource_colors[Index]
}
}
#declare Index = Index + 1;
#end
light_source {
point_lightsource_pos
color 0.4
}