Magic ball in a prison cell.

A point light source is used to create the effect of a overhead light shining onto a glass ball.
Texture mapping is used to create the walls and floor.

------------------------------------------------------------------------------------------------

SBT-raytracer 1.0

camera {
position = (0,5,-15);
look_at = (0,-1,1);
}

point_light {
position = (0, 10, 0);
color = (1, 1, 0.9);
constant_attenuation_coeff= 0.25;
linear_attenuation_coeff = 0.003372407;
quadratic_attenuation_coeff = 0.000045492;
}

translate(0,-0.5,0,
scale(2,
sphere {
material = {
reflective = (0,0,0);
transmissive = (1,1,1);
emissive=( 0,0,0);
index = 1.5;
};
}))

translate(0,-5,0,
scale(5,
box {
material = {
diffuse = (0.1,0.1,1);
specular = (0,0,0)
};
}))

// back wall
translate(0,0,7.5,
scale(15,15,0.2,
box {
material = {
diffuse = map("books.jpg");
specular = (0.5, 0.5, 0.5);
reflective = (0, 0, 0);
shininess = 25.6;
};
}))

// left wall
rotate(0,1,0,1.57079633,
translate(0,0,-7.5,
scale(15,15,0.2,
box {
material = {
diffuse = map("wall.jpg");
specular = (0.5, 0.5, 0.5);
reflective = (0, 0, 0);
shininess = 25.6;
};
})))

// right wall
rotate(0,1,0,1.57079633,
translate(0,0,7.5,
scale(15,15,0.2,
box {
material = {
diffuse = map("wall.jpg");
specular = (0.5, 0.5, 0.5);
reflective = (0, 0, 0);
shininess = 25.6;
};
})))

// floor
rotate(1,0,0,1.57079633,
translate(0,0,7.5,
scale(15,15,0.2,
box {
material = {
diffuse = map("floor.jpg");
specular = (0.5, 0.5, 0.5);
reflective = (0, 0, 0);
shininess = 25.6;
};
})))