# MAGNIFIER DEMO

Please click on the window to get keyboard focus.

This example integrates 2-D, 3-D, and sound, and presents a magnifying glass, written entirely with the DirectAnimation Java API.

Left click to increase speed, right click to decrease. Press the SpaceBar to texture map the animation onto a sphere. Press the SpaceBar again to map that onto a cube.

Move the orange-bordered magnifying box around with the mouse. Use up and down arrows to change the size of the magnifying window. Use left and right arrows to change the magnification factor.

This example demonstrates the seamless integration between 2-D and 3-D in DirectAnimation. The cone, cube, and cylinder are 3-D objects being dynamically projected onto an image, which is then composed with another image constructed from time-varying text, whose color is time- varying as well. The result is overlayed onto the background which is also time-varying in that a lightning flash occurs occasionally.

The magnifying glass simply is a scaled, cropped version of the entire image, overlayed onto an orange image. This composition is laid on top of the image previously described.

Note that the DirectAnimation concept of infinite resolution comes into play here, since in the magnified version, you don't see enlarged versions of the pixels that represent the text and the geometry. Rather, these are presented at high resolution within the magnifying glass, reflecting the continuous nature of the image data type. Finally, you do see the pixels blowing up on the background image, because its original source is a bitmap and is defined by its pixels.

View Java Source Code