// Persistence of Vision Ray Tracer Scene Description File // File: yeux.pov // Vers: 3.1 // Desc: Eyes looking at the camera // Date: 12/02/1999 // Auth: E.P. JEANTON #include "colors.inc" #declare camera_location = <-3, 5, 0>; #declare camera_look_at = <1, 3, 7>; camera { location camera_location look_at camera_look_at } light_source { <0, 9.5, 0> color 2 } plane { y, 0 pigment {checker color White color LightBlue} } // One eye #declare Eye = prism { cubic_spline 0, 0.1, 8, <0.7, -0.2>, <0.9, 0>, <1.3, 0.2>, <2.0, 0.3>, <1.2, -0.3>, <0.7, -0.2>, <0.9, 0>, <1.3, 0.2> } // The two eyes #declare Eyes = union { object { Eye } object { Eye scale <-1, 1, 1> } rotate 90*x } // Below is my VBCE (Very Big Calculation Engine) ! #declare a = 180-degrees(atan2(camera_location.x-camera_look_at.x,camera_look_at.z-camera_location.z)); #declare b = 180-degrees(atan2(camera_location.y-camera_look_at.y,camera_look_at.z-camera_location.z)); // Now, you get it facing at you !! object { Eyes rotate <-b, a, 0> translate camera_look_at pigment { color rgb <1, 0, 0> } }