ROTATINGCUBE APPLET

  • Uses backface-removal so that only sides facing the viewer are shown

  • Doesn't use depth-sorting since the backface-removal eliminates the need for it on a cube

  • Lets you modify the position, rotational velocity, rotation delay, and colour of the cube

  • Lets you modify the aspect of the cube and background colour / image

  • Here's the RotatingCube source and the Vertex source.

    The background image may take a sec to load so it'll look ugly at first.

    And here's the HTML code that I used on the applet you are (hopefully) looking at ...

    <APPLET CODEBASE="java/" CODE="RotatingCube.class"
            WIDTH=240 HEIGHT=200 ALT="RotatingCube Applet">
    <PARAM NAME=X VALUE=0>
    <PARAM NAME=Y VALUE=0>
    <PARAM NAME=Z VALUE=50>

    <PARAM NAME=x_velocity VALUE=3>
    <PARAM NAME=y_velocity VALUE=2>
    <PARAM NAME=z_velocity VALUE=1>

    <PARAM NAME=uniform_scale VALUE=TRUE>
    <PARAM NAME=delay VALUE=10>

    <PARAM NAME=colour VALUE=00FF80>
    <PARAM NAME=bgcolour VALUE=000099>
    <PARAM NAME=bgimage VALUE="bg.gif">
    </APPLET>