Up    Next

off2vrml - converts OFF files to VRML format

Usage    |    Examples    |    Notes    |    POV File Structure

Usage

Synopsis

off2vrml [options] input_files

Description

Convert OFF files to VRML format.

Options

input_files
input files in OFF format, or if not given the program reads from standard input

-h
program help

-v <rad>
radius of vertex spheres (0 for no vertex sphere), or 'b' to have radius of balls in the first file of the maximum size without overlap (default: ball_rad/12)

-e <rad>
radius of edge cylinders (default: vertex_rad/1.5)

-V <col>
default vertex colour, in form r_val,g_val,b_val (values 0.0-1.0, or 0-255) or hex xFFFFFF (default: 1.0,0.5,0.0)

-E <col>
colour for edges, in form r_val,g_val,b_val (values 0.0-1.0, or 0-255) or hex xFFFFFF, or 'd' to use digons for edges, 'f' to use face colour for edges (default: 0.8,0.6,0.8)

-F <col>
default face colour, in form r_val,g_val,b_val (values 0.0-1.0, or 0-255) or hex xFFFFFF (default: 0.8,0.9,0.9)

-x <elems>
hide elements. The element string can include v, e and f to hide, respectively, vertices, edges and faces

-o <file>
write output to file, if this option is not used the program writes to standard output
Scene Options
-D <dist>
distance to camera

-C <cent>
centre of points, in form x_val,y_val,z_val (default: calculated)

-L <look>
point to look at, in form x_val,y_val,z_val (default: points centre)

-R <rot>
rotate about axes through centre of points, in form x_val,y_val,z_val (degrees)

-B <col>
background colour, in form r_val,g_val,b_val (values 0.0-1.0, or 0-255) or hex xFFFFFF

Precision Options

-d <dgts>
number of significant digits for output (default 17) or if negative then the number of digits after the decimal point

-t
display type for faces 0 VRML polygons (default) 2 triangulate polygons by joining each edge to a centre point. (Incomplete solution to rendering non-simple polygons. Will not render all polygons correctly.)

Examples

Display a ball pack as balls
   packer 2 10 |  off2vrml -xef -v b -o pack.wrl
Display an icosahedron without its faces
   unipoly icosahedron | off2vrml -x f -o icosa.wrl
Display an icosahedron without its vertex or edge elements
   unipoly icosahedron | off2vrml -x ef -o icosa.wrl
Display an icosahedron with thin vertex and edge elements
   unipoly icosahedron | off2vrml -v 0.01 -e 0.008 -o icosa.wrl
Display a polyhedron with self-intersecting polygons, using transparent faces
   polygon -t anti 5/3 | off2vrml -F 0.3,0.6,0.8,0.5 -t 2 -o anti.wrl

Notes

Vertices coinciding, or very close together, may cause no elements to be drawn for the vertices or edges if default sizes are used. Instead, a value can be set with -v or -e.

Use -v b to draw ball packs.

Shapes with self-intersecting faces generally need the -t option, otherwise they may be displayed with missing areas. However this option may draw parts of the face outside of the edges.

OFF files with a lot of elements will produce large VRML files that may be difficult to render on some machines. Excluding vertex and edge elements will greatly reduce the resources required to render the VRML file.

Up: Programs and Documentation
Next: off2m - converts an OFF file for LiveGraphics3D

Antiprism Documentation 10.3.2007 - http://www.antiprism.com/