EMAIL: jha@aughey.com NAME: John Aughey TOPIC: Toys COPYRIGHT: I SUBMIT TO THE STANDARD RAYTRACING COMPETITION COPYRIGHT. TITLE: Batteries Not Included COUNTRY: United States RENDERER USED: Povray TOOLS USED: Self written Perl script CREATION TIME: 14 hours VIEWING RECOMMENDATIONS: This is a rather large animation, ~590 frames, and the surface the track is placed on is rather complex. As a consequence, the mpeg image quality suffers. You may notice unavoidable compression artifacts. This animation is best viewed between 20 and 25 fps. HARDWARE USED: 300Mhz Pentium II ANIMATION DESCRIPTION: This animation shows a steel marble rolling down a 2 gague wire track. DESCRIPTION OF HOW THIS IMAGE WAS CREATED: The entire animation was created using a Perl script I wrote. Much of the viewer code was taken from my submission to the January 1998 animation contest, snake.mpg. The script reads in an input file consisting of control points for the track. These control points are used to build a cubic spline curve which is used to draw the actual track. This input file also contains information for vertical supports, flags, and camera orientation. Once the spline functions are created for the track, a function traverses the splines and generates short cylinders which represent the track. The angle between 2 adjecent cylinders is at most 1 degree. A sphere is placed at the joining point of each cylinder pair to elimate the gap that would be visible between the two cylinders. All of these short cylinders joined head to tail give the illusion of one solid wire track. 7642 cylinders and 7642 spheres are used to create the track. Second, a function traverses the spline functions again to compute the ball position at each frame of the animation. The acceleration due to gravity is taken into consideration so the ball will speed up and slow down as it goes down and up hills. When the ball hits the stop at the end of the track, the velocity vector is reversed and greatly dimished. From there, friction takes over to slow the ball down to a stop. The camera motion uses 5 seperate spline curves to determine the x,y,z focal point and the x,y angle. The control points for the x,y angle splines are created from values in the input file. The control points for the x,y,z focal point splines are created using the ball sequence points. If each ball point were used as a control point for this spline, then the ball would be in the exact center of the image for each frame. Instead, every 15th ball point is used as a control point. This causes the camera to look in the general direction of the ball, but not focused right on it. The camera also lags a few frames behind the ball. This combined with the fluid angular changes creates a very pleasing camera motion. The Perl script uses the Tk and OpenGL module to provide a user interface to the animation. Sliders are available to control every aspect of the animation. Camera angle, position, lens, frame lag, and slack can be changed to view the animation from any angle. Any changes are reflected in the OpenGL window which displays the current scene. All changes can be viewed in real time to see the effect on the image. The animation can be viewed in OpenGL window over and over again until the desired effect is accomplished. When I am ready to create the animation using Povray, I click on the Povray tab, select the image size and quality, and hit go. A total time and estimated time to complete is updated continously so I know when to return from my coffee break.