VRML Concepts



  1. Create and edit a new file in "extrude1.wrl":

    Your task is to create an extrusion shape using the cross-section and extrusion spine values output by the extrude program and saved in extrude.dat. You will need to create a Shape, set it's Appearance and Material, then build the Extrusion geometry. In addition to the cross-section and spine for the extrusion, set these fields:

    You'll need to read the extrusion data into your VRML file. In vi you can do this by typing, in command mode:

    This will read the extrude.dat file contents into your VRML file starting on the line right after the line the cursor is on.

    SOLUTION: extrude1.wrl

  2. Make a copy of your "extrude1.wrl" world:

    Your task is to add a ball that slides up the extrusion path. You'll need a TimeSensor node and a PositionInterpolator node. Use the data from the "extrude.dat" file for the key fractional times and key positions for the interpolator.

    SOLUTION: extrude2.wrl

  3. Make a copy of the "extrude2.wrl" world:

    Extra credit: The animation from the previous task slides the ball up the slide. Your task is to make it slide down the slide instead! There are at least two ways to do this:

    The first method above is easy. Your task is to do the second method: reverse time!

    SOLUTION: extrude3.wrl