// Persistence of Vision Ray Tracer Scene Description File // File: Qheuen.pov // Vers: 3 // Desc: Checkered Floor Example // Date: 7/22/98 // Auth: Steve Sloan II #version 3.1; #include "colors.inc" global_settings { assumed_gamma 1.0 } #declare my_clock = 0.5; //#declare my_clock = clock; // ---------------------------------------- camera { location <0, 2, -8> direction 1.5*z right 4/3*x look_at <0, 1, 0> } // Closeup of the bottom //camera { // location <0, 1, -2> // direction 1.5*z // right 4/3*x // look_at <0, 0, 0> //} sky_sphere { pigment { gradient y color_map { [0.0 color blue 0.6] [1.0 color rgb 1] } } } light_source { <-30, 30, -30> color White } // ---------------------------------------- plane { y, 0 translate -2*y texture { pigment {checker color rgb 1 color blue 1 scale 0.5} // finish {reflection 0.2} } } plane { -z, 0 translate 4*z texture { pigment {checker color rgb 1 color green 1 scale 0.5} // finish {reflection 0.2} } } // Compute a sawtooth wave of motion based on the clock variable // Parameters: // currclock: The original clock variable #macro SawToothClock (currclock) #if (currclock <= 0.5) currclock*2; #else (1 - currclock)*2; #end #end // Compute a sine wave of motion based on the clock variable // Parameters: // currclock: The original clock variable #macro SineWaveClock (currclock) #local my_pi = 3.14159265359; sin(my_pi*currclock) #end #declare SpeechVentOpen = array[5] #declare SpeechVentOpen[0] = SineWaveClock(my_clock); #declare SpeechVentOpen[1] = 1 - SineWaveClock(my_clock); #declare SpeechVentOpen[2] = SineWaveClock(my_clock); #declare SpeechVentOpen[3] = 1 - SineWaveClock(my_clock); #declare SpeechVentOpen[4] = SineWaveClock(my_clock); //#declare SpeechVentOpen[0] = 1; //#declare SpeechVentOpen[1] = 1; //#declare SpeechVentOpen[2] = 1; //#declare SpeechVentOpen[3] = 1; //#declare SpeechVentOpen[4] = 1; //#declare temp_same = my_clock; //#declare cupola_height = 1; #declare cupola_height = SineWaveClock(my_clock) //#declare teeth_open = temp_same; #declare teeth_open = SineWaveClock(my_clock); //#declare tongue_out = temp_same; #declare tongue_out = SineWaveClock(my_clock); //#declare tongue_extension = temp_same; #declare tongue_extension = SineWaveClock(my_clock); // Create Qheuen Carapace #declare Qheuen_Carapace = blob { threshold .65 #declare Count = 0; #while (Count < 5) #declare Angle = 72*Count; cylinder { <-0.6, 0, 0>, <0.6, 0, 0>, 0.5, 1 translate z rotate Angle*y } cylinder { <-0.5, 0, 0>, <0.5, 0, 0>, 0.5, 1 scale <1, 6/5, 1> translate <0, 0.1, 0.6> rotate Angle*y } cylinder { <-0.1, 0, 0>, <0.1, 0, 0>, 0.3, 1 translate <0, 0.3, 0.6> rotate Angle*y } // Scent Slits sphere { 0, 1, -1 scale <0.1, 1, 0.02> rotate 45*x translate <0, 0.5, 0.7> rotate Angle*y } // Speech Vents sphere { 0, 1, -1 scale <0.2, 0.01 + 0.04*SpeechVentOpen[Count], 1> rotate -20*x translate <0, 0.25, 1.4> rotate 36*y rotate Angle*y } // Simulate the way skin would stretch // as the cupola changes height #if (cupola_height <= 0) cylinder { <-0.2, 0, 0>, <0.2, 0, 0>, 0.1*(1 - cupola_height), -1 scale <1, 5, 1> translate <0, 0.4, 0.35> rotate Angle*y } cylinder { <-0.1, 0, 0>, <0.1, 0, 0>, 0.1*(1 - cupola_height), -1 scale <1, 5, 1> translate <0, 0.4, 0.35> rotate 36*y rotate Angle*y } #end // Leg Holes sphere { 0, 1, -1 scale <0.6, 0.2, 0.8> translate 1.2*z rotate 36*y rotate Angle*y } #declare Count = Count + 1; #end // Bottom Bulge sphere { 0, 1, 1 scale <1.5, 0.75, 1.5> translate -0.25*y } // Mouth sphere { 0, 0.3, -1 translate -0.6*y } cylinder { -0.5*y, 0.5*y, 0.2, -1 translate -0.8*y } // Cupola cylinder { 0, (0.6*cupola_height + 0.15)*y, 0.75, 1 } pigment { color Red } } // Teeth #declare QheuenTeeth = union { #declare Count = 0; #while (Count < 10) #declare Angle = 36*Count; // #if (Count < 5) // temporary! intersection { sphere { 0, 1 scale <0.075, 0.35, 0.04> } plane { -z, 0 } plane { -x, 0 rotate 12.1*z translate -0.075*x } plane { x, 0 rotate -12.1*z translate 0.075*x } rotate (45 - 30*teeth_open)*x translate 0.25*z rotate Angle*y pigment { color White } } // #end // temporary! #declare Count = Count + 1; #end } // Tongue #declare QheuenTongue = intersection { blob { threshold .65 cylinder { y, -0.2*y, 0.15, 1 } #declare Count = 0; #while (Count < 5) #declare Angle = 72*Count; sphere { 0, 1, 1 scale <0.035, 0.1, 0.035> translate -0.075*y rotate (35*tongue_extension - 5)*z translate 0.05*x rotate Angle*y translate -0.25*y } #declare Count = Count + 1; #end translate -0.3*tongue_out*y } plane { y, 0 } translate -0.4*y pigment { color Blue } } #declare Qheuen = union { object { Qheuen_Carapace } #declare Count = 0; #while (Count < 5) #declare Angle = 72*Count; // Leg "shoulder" joints sphere { 0, 0.08 translate 1.25*z rotate 36*y rotate Angle*y pigment { color Blue } } #declare Count = Count + 1; #end // Sensor ring torus { 0.325, 0.02 scale <1, 2, 1> translate (0.6*cupola_height + 0.2)*y pigment { color Blue } } object { QheuenTeeth translate -0.55*y } object { QheuenTongue } } // Side View -- Pointy Side object { Qheuen rotate 360*my_clock*y translate <-1.5, -0.5, 0> } // Side View -- Flat Side object { Qheuen rotate 360*my_clock*y rotate 36*y rotate 20*x translate <1.5, -0.5, 0> } // Bottom View object { Qheuen rotate 360*my_clock*y rotate 90*x translate <-1.5, 2, 0> } //object { Qheuen rotate 360*my_clock*y rotate 90*x } // Top View object { Qheuen rotate 360*my_clock*y rotate -90*x translate <1.5, 2, 0> }