Up    Next

off2vrml - converts OFF files to VRML format

Usage    |    Examples    |    Notes

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/15)

-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, x to hide implicit 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, 1 - triangulate polygons (default)

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 -o anti.wrl

Notes

When viewing in the VRML browser the rotation centre will most likely be assigned to the Look At point. Rotations given with option -R happen prior to viewing and use the actual rotation centre.

Use -v b to draw ball packs.

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 18.8.2007 - http://www.antiprism.com/