Animating lights

By placing a light in a transformation group and animating the group you can easily move a light around a virtual world. For example, you can have a spotlight that orbits an object. You can also animate a light's properties to achieve various effects. For example, you can animate it's colour and intensity.

VRML Example (rotating red spotlight with alarm sound).
Click on the cylinder to start the animation sequence. The animation itself is controlled by a timer, orientation interpolator and a script. The script is simply used to calculate the start and stop times for the timer so that the animation (a 360 degree rotation of the light that takes .5 seconds) is repeated 20 times. The audio alarm is similarly looped. Note that the spotlight is only on as long as the timer is active.




Michael Louka, October 10, 2001