Blocks World

This is an applet to demonstrate 3D graphics in Java (JDK 1.0) and is also a lesson in object oriented design. Version 1.11. See the Java console for details.

Click a block to specify a source and click another block to specify a destination to stack the blocks. Only top blocks can be moved. The following keyboard commands are also available:

  • "Spacebar" to reset the blocks.
  • "n" to move nearer the blocks.
  • "f" to move farther from the blocks.
  • "i" to increment the number of blocks and reset.
  • "d" to decrement the number of blocks and reset.
  • "s" for a shorter focal length (zoom out).
  • "l" for a longer focal length (zoom in).
  • "x" to translate to the left.
  • "X" to translate to the right.
  • "y" to translate down.
  • "Y" to translate up.
  • "Left arrow" to pan left.
  • "Right arrow" to pan right.
  • "Down arrow" to pan down.
  • "Up arrow" to pan up.
  • Java source code is for educational purposes only. Viewing or downloading the source implies your consent to obey the restrictions:

    1. Use the source code for educational purposes only.
    2. Give appropriate attribution in all executables and listings.
    3. Reproduce these restrictions and conditions.

    I agree to the restrictions and conditions on the source code.


    This page established December 4, 1998; last updated December 10, 1998.