|
|
Usage: off2pov [options] input_files
Convert files in OFF format to POV format for display in POV-ray. If
input_files are not given the program reads from standard input.
Options
-h,--help this help message (run 'off_util -H help' for general help)
--version version information
-v <rad> radius of vertex spheres, or 'b' to have radius of balls
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,G,B,A' (3 or 4 values
0.0-1.0, or 0-255) or hex 'xFFFFFF' (default: 1.0,0.5,0.0)
-E <col> default edge colour, in form 'R,G,B,A' (3 or 4 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,G,B,A' (3 or 4 values
0.0-1.0, or 0-255) or hex 'xFFFFFF' (default: 0.8,0.9,0.9)
-x <elms> hide elements. The element string can include v, e and f
to hide vertices, edges and faces
-n <elms> show element index number labels. The element string can
include v, e and f to label vertices, edges and faces
-s <syms> show symmetry elements. The element string can include
x - rotation axes
m - mirror planes
r - rotation-reflection planes
a - all elements (same as xmr)
-m <maps> a comma separated list of colour maps used to transform colour
indexes, a part consisting of letters from v, e, f, selects
the element types to apply the map list to (default 'vef').
-t <disp> select face parts to display according to winding number from:
odd, nonzero (default), positive, negative, no_triangulation
(use native polygon display)
-O <type> output type, can be: 'a' all in one POV file (default),
's' separate files, 'o' objects only, 't' template only
-i <fils> include files (separated by commas) for every POV geometry
-j <fils> include files (separated by commas) for the POV scene file
-J <fils> include files (separated by commas) containing additional POV
objects for the POV scene file
-o <file> write output to file (default: write to standard output)
Scene options
-D <dist> distance to camera
-C <cent> centre of points, in form 'X,Y,Z'
-L <look> point to look at, in form 'X,Y,Z'
(default, points centre)
-R <rot> rotate about axes through centre of points, in
form 'X-ang,Y-ang,Z-ang' (degrees)
-B <col> background colour, in form 'R,G,B,A' (3 or 4 values
0.0-1.0, or 0-255) or hex 'xFFFFFF'
-P <pers> narrow the angle of perspective (range 0-100,
default: 2, recommend 4 for stereo option -S 1)
-W use lighting with shadows -S <type> produce stereo output, type is 0 (default) mono, 1 stereo
with one image file, 2 stereo with two image files (use
the POV-Ray +KFF2 option for output)
Precision options
-d <dgts> number of significant digits (default 17) or if negative
then the number of digits after the decimal point
off2pov -v b -o pack.pov pack.off
off2pov -v b -R 0,180,0 -o pack.pov pack.off
off2pov -x f -o icosa.pov icosahedron
off2pov -x ve -o icosa.pov icosahedron
off2pov -v 0.01 -e 0.008 -o icosa.pov icosahedron
The output POV file is easy to edit in a text editor. Many of the program options which are used when creating the file can also be set afterwards by editing the file. See POV Files Structure.
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.
POV-ray may not be able to display the output, or may display it incorrectly. I have tried to make the generated file robust, but precision issues could cause problems in apparently correct POV files.
Including files and making changes by hand may easily break some of the basic functionality, for example vertex numbering and some stereo options.
You can change the default aspect ratio on the POV-Ray command line. A square image could be drawn with POV-Ray options +H300 +W300 Declare=AspectRatio=1.
A different camera and different lights can be given in an include file. The default camera or lights can be excluded.
col_to_tex(col, elem_tex_map, elem_col_map, def_tex)
The col_to_tex macro maps a colour or colour index to a texture. col is the colour vector, if the second coefficient is -1 then the first coeefficient is a colour index, otherwise the vector represents a POV-ray colour. elem_tex_map maps indexes to textures. elem_col_map maps indexes to colours. def_col is the default colour. The texture is found in the following way
disp_vertex(vertex, col)
vertex is the index into the verts array. col is the colour.
disp_edge(edge, col)
edge is the index into the edges array. col is the colour.
disp_face(face, idx, col)
face is the face number. idx is the index into the face array (pointing to the value giving the number of vertices in the face). col is the colour.
The default macro calls one of the following macros, determined by the value of face_dtype, to actually display the face
disp_face_polygon(face, idx, col) disp_face_flattened_polygon(face, idx, col)
disp_extra()Called once for each geometry. The default macro does nothing.
Up:
Programs and Documentation
Next:
off2vrml - convert an OFF file to VRML format