This is a very simple demonstration of a global lighting effect using a Venn diagram. Three, transparant lenses are used - one red, one green, and one blue. They're scaled and positioned so that their projection forms a Venn diagram. Asingle white directional light is shone straight at the lenses and the overalleffect is that the color of each lens mix to form the diagram.

Ray File:

SBT-raytracer 1.0

// This is a very simple example of
// Transperancies using a Venn
// diagram. Set depth to at least
// four for the correct effect.

camera
{
position = (5, 0, 0);
viewdir = (-1, 0, 0);
updir = (0, 0, 1);
}

directional_light
{
direction = (-1, 0, 0);
color = (1, 1, 1);
}

// Red Lens
translate( 0, -1, 0,
scale(.2, 1.5, 1.5, sphere {
material = {
diffuse = (1, 0, 0);
transmissive = (1.0, 1.0, 1.0);
index = 1.0;
}
} ) )

// Green Lens
translate( -5, 2, 0,
scale(.4, 3.0, 3.0, sphere {
material = {
diffuse = (0, 1, 0);
transmissive = (1.0, 1.0, 1.0);
index = 1.0;
}
} ) )

// Blue Lens
translate( -10, 0, 3,
scale(.6, 4.5, 4.5, sphere {
material = {
diffuse = (0, 0, 1);
transmissive = (1.0, 1.0, 1.0);
index = 1.0;
}
} ) )