ESM4714
Scientific Visual Data Analysis and Multimedia
Exercise #11: Create VRML file of Glyphs in exercise#10


Many physical properties can be written as second order, fourth order, or higher order tensors. In the class handout "Three Visual Methods: Gradients, Function Extraction, and Tensor Glyphs", we explained how to construct visual representations of second and fourth order tensors. In exercise#10 we introduced you how to construct simple 3D objects. In this exercise we will show you how to create VRML files of the glyphs drawn in exercise#10. With the skills you learn in this exercise you should be able to construct VRML file of any 3D object that is constructed of polygonal data sets, but here we start with simple 3D objects.

NOTE: Highlighted italic text denotes user response.


Objective: We start by constructing a simple four-sided tetrahedron.

Procedure:

  1. Logon onto mercury -> pluto.smvc.vt.edu at the VT-CAVE classroom (SMVC).

  2. Mount your optical disk (see procedure for mounting scsi devices).
  3. Go to the ESM4714/examples directory.

  4. Locate the directories that contain PV-Wave procedure files for generating a simple box, tetrahedron, and a sphere.

    viz?% cd /optical/ESM4714/examples/poly
    viz?% ls -lag

  5. Go into the tetra directory and create a new directory called p2v,

    viz?% cd tetra
    viz?% mkdir p2v

  6. Then copy the vertice and the polygonal data files from the tetra directory to p2v directory.

    viz?% cp *.dat p2v

  7. Then change to the p2v directory and change the names of the vertice file to "vert.dat" and the polygonal dataset file to "poly.dat".

    viz?% cd p2v
    viz?% mv tetra_vert.dat vert.dat
    viz?% mv tetra_poly.dat poly.dat

  8. Save the "poly2vrml1.pro" from this web page into the p2v directory. To download this file, move mouse over the link and shift click on the link, a file "save as" dialog box will appear, then click into the p2v directory and click on save. Then execute PV-Wave and run the procedure by typing "poly2vrml1" at the prompt.

    viz?% wave
    viz?% wave>poly2vrml1

  9. This procedure Runs very fast, once done, exit PV-Wave and list the files in the directory. Two new files will have been created. "color.dat" and "object.wrl". color.dat file is a file that holds the values of all the colors used in the creation of the object, in this example it only uses a single color. The file named object.wrl is the actual VRML(Virtual Reality Modeling Language) file that will creates a 3D object that can be viewed using a VRML viewer. Some of these viewers can be used as plugins on your Web browser. Information on the current state of VRML is summarized on the Web3D consortium Web site http://www.web3d.org/vrml/vrml.htm. A VRML 1.0 tutorial on An Introduction to VRML, diversifly, and the CAVE Collaborative Console demonstrates how to create simple VRML 1.0 files that can be viewed both on your Web browser and in the CAVE using the CAVE Collaborative Console (CCC) or Diversifly.

  10. Open the object.wrl file through your web browser, now you can rotate, magnify, shrink, spin, and study your object. Once you are done with the tetrahedron, you will need to generate box, sphere, and elliptic glyph objects in the same procedure as you followed to generate the tetrahedron VRML file. Your objects should look like the following figures:

    Tetrahedron.

    Box.

    Sphere.

    and Elliptic Glyph.

  11. This particular PV-Wave procedure converts the polygonal dataset to a vrml 1.0 file. The vrml file can be edited using any ordinary text editor.

Click image to return to Visualization home page.
R.D. Kriz
Virginia Tech
College of Engineering
Revised 01/10/99

http://www.sv.vt.edu/classes/ESM4714/exercises/exer11/exer11.html