// Animation Sequence // Copyright 2007 Les Hall // This software is protected by the GNU General Public License // a crystal crown of thorns like Jesus wore during his crcifixion // settings #declare num_loops = 5; #declare thorn_size = 1/5; #declare stick_size = 1/50; #declare rad = 5; #declare crown_height = 1; // settings global_settings { assumed_gamma 1 photons { count 1000000 max_trace_level 256 media 100 } } // include files #include "rand.inc" // the camera camera { location <0, 4, 10> look_at <0, -2, 0> } // light sources light_source {<0, 0, -rad/2>, rgb<10, 0, 0> rotate<0, 0, 0>} light_source {<0, 0, -rad/2>, rgb<0, 10, 0> rotate<0, 2/3*pi, 0>} light_source {<0, 0, -rad/2>, rgb<0, 0, 10> rotate<0, -2/3*pi, 0>} #declare theta = 0; #declare xp1 = rad * sin(theta); #declare yp1 = 0; #declare zp1 = - rad * cos(theta); union { #while (theta < 2*pi*num_loops) // random theta #declare del_theta = pi/4*(SRand(RdmA)+1.01); #declare theta = theta + del_theta; // calculate new endpoint #declare xp2 = rad * sin(theta); #declare yp2 = SRand(RdmA)*crown_height; #declare zp2 = - rad * cos(theta); // thorn direction #declare thorn_x = SRand(RdmA)*rad*thorn_size; #declare thorn_y = SRand(RdmA)*rad*thorn_size; #declare thorn_z = SRand(RdmA)*rad*thorn_size; // One Segment cylinder {, , rad*stick_size} sphere {, rad*stick_size} cone {, rad*stick_size, , 0} // save next point #declare xp1 = xp2; #declare yp1 = yp2; #declare zp1 = zp2; #end interior { ior 1.5 } pigment { rgb<1, 1, 1> transmit 0.9 } finish { ambient 0.2 diffuse 0.0 reflection 0.12 specular 1.0 roughness 0.001 } photons { target reflection on refraction on collect on pass_through off } rotate <0, -360*clock, 0> }