vrml.icn: Procedures to support creation of VRML files

procedure point_field:     create VRML point field
procedure u_crd_idx:       create VRML coordinate index
procedure vrml1:           write VRML 1.0 file
procedure vrml2:           produce VRML 2.0 file

link vrml
May 2, 2001; Ralph E. Griswold
Requires: Version 9 graphics for color conversion
See also: vrml1lib.icn and vrml2.icn
This file is in the public domain.

This file contains procedures for producing VRML files.

     point_field(L)  create VRML point field from point list L

     u_crd_idx(i)    create VRML coordinate index for 0 through i - 1

     render(x)       render node x

     vrml1(x)        produces VRML 1.0 file for node x

     vrml2(x)        produces VRML 2.0 file for node x

     vrml_color(s)   convert Icon color specification to vrml form

Notes:

  Not all node types have been tested.

  Where field values are complex, as in vectors, these must be built
  separately as strings to go in the appropriate fields.

  There is no error checking.  Fields must be given in the
  order they appear in the node record declarations and field values
  must be of the correct type and form.

The introduction of record types other than for nodes will cause
bogus output.  A structural loop will produce output until the
evaluation stack overflows.

Source code | Program Library Page | Icon Home Page