// Persistence of Vision Ray Tracer Scene Description File // File: pathAB.pov // Vers: 3.5 // Desc: This povray file creates an animation that moves a torus along a // straight line connecting the points A and B. // Note, to move the location of the path one just needs to change the // values of A and B (see below) without changing anything else. // Date: Nov 02 // Auth: Jenny Orr #include "colors.inc" #include "transforms.inc" // ****************************************************************// // These determine the path. Change these to change the path. #declare A = <0,0,5>; // beginning or path #declare B = <4,3,0>; // end of path // ****************************************************************// // Cameras and lights background { White } camera{ location <0, 0, -10> look_at <4, 2, 0> } light_source{ <5,10,-10> White } light_source{ <0,10,-10> White } // ****************************************************************// // This is the object being moved from A to B torus { 0.8, 0.2 pigment { rgb < .4,.4,1> } Point_At_Trans(B-A) // this orients the torus along path translate A*(1-clock) + B *clock } #debug concat("clock is:",str(clock,5,2),"\n") // Ground plane { y, // unit surface normal, vector points "away from surface" -1.0 // distance from the origin in the direction of the surface normal pigment { Gray } } // ****************************************************************// // These make the path visible by putting spheres at // the beginning and end, and connecting the spheres with // a green cylinder. sphere { // Starting point A // center of sphere 0.5 // radius of sphere pigment { Yellow } } sphere { // Ending point B // center of sphere 0.5 // radius of sphere pigment { Red } } cylinder { A, B, .1 pigment { Green } }