How to animate the universe and create movies.

prev toc next
You can download example source code for this HowTo here. It is very easy to animate the virtual universe and to record the animation, so that it can be stored as a video file and as such easily embedded into presentations. The following lines show an easy example:
	// Add the image as a volume

	// animate the universe

	// record a 360 degree rotation around the y-axis
	ImagePlus movie = univ.record360();;
The call to the universe's record() method returns an ImagePlus, which consists of a stack of successive frames of a full 360 degree animation. ImageJ provides methods to save such a stack for example as AVI file or as animated GIF.