Up
Next
off_trans - transformations (rotations, etc) of OFF files
off_trans [options] input_files
Read a file in OFF format and apply transformations to it.
- input_file
- input file in OFF format, or if not given the program reads from stdin
- -h
- program help
- -T <tran>
- translation, three numbers separated by commas which are
used as the x, y and z displacements
- -R <rot>
- rotation about an axis, four numbers separated by
commas. The first three numbers are a direction vector for the axis,
the last number is the angle to rotate (in degrees)
- -M <norm>
- reflection in a plane, three numbers separated by commas which
give a vector normal to the plane of reflection.
- -S <scal>
- scale, one, three or four numbers separated by commas. If one
number then scale by this factor in all directions. If three
numbers these are the factors to scale along the x, y and
z axes. If four numbers, the first three are a direction
vector for the scaling, the last number is the factor to scale
- -I
- invert (equivalent to -S -1)
- -X <mtrx>
- transformation matrix of 9 or 12 values, given left-to-right
top-to-bottom, used to premultipy each coordinate
- -s <type>
- Relative scaling. Scale so a measure has a value of 1. This
option is applied last after any other transformations.
VwAa need an oriented polyhedron, Vw need a closed polyhedron.
- V - volume
- A - area
- a - average face area
- E - perimeter (sum of edges)
- e - average edge length
- -o <file>
- write output to file, if this option is not used
the program writes to standard output
cube.off is a cube with vertices (±1, ,±1, ±1).
To rotate 45 degrees it about the edge running from (1,1,1) to (1,1,-1)
the cube must be translated so that line passes through the origin,
roatated 45 degrees about the direction of the line, then translated
back.
off_trans -T -1,-1,0 -o cube_a.off cube.off
off_trans -R 0,0,1,45 -o cube_b.off cube_a.off
off_trans -T 1,1,0 -o final_cube.off cubeb.off
This can be combined as
off_trans -T 1,1,0 -R 0,0,1,45 -T 1,1,0 -o final_cube.off cube.off
Up:
Programs and Documentation
Next:
off_align - alignment of OFF files
Antiprism Documentation 15.3.2007 -
http://www.antiprism.com/