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 seperated 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)
- -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 9.3.2006 -
http://www.antiprism.com/