Up
Next
m2off - converts a LiveGraphics3D 'm' file to OFF format
m2off [options] [input_file]
Convert a file from 'm' format, used by
LiveGraphics3D ,
to OFF format.
- input_file
- input file in 'm' format, or if not given the program reads from
standard input
- -h
- program help
- -x <elems>
- hide elements. The element string can include v, e and f
to hide, respectively, vertices, edges and faces
- -l <lim>
- minimum distance for unique vertex locations as
exponent 1e-lim (default: 13 giving 1e-13)
- -b
- use back face colors instead of front ones, if available
- -v
- turn model to LiveGraphics3D viewpoint
- -C <file>
- dump color lights into OFF file
- -o <file>
- write output to file, if this option is not used
the program writes to standard output
Create a .m file with LiveGraphics3D colouring to use as an example
unipoly snub dodecahedron | off2m -t 0 -l > snub_dod.m
Convert a LiveGraphics3D model to OFF format
m2off snub_dod.m > snub_dod.off
Convert a LiveGraphics3D model to OFF format, colouring it similarly
to the way LiveGraphics3D does, and view it
m2off -C color.off snub_dod.m | off_color -f L -l color.off | antiview
The next two examples use models from the
Color Volumes page, which is one the
LiveGraphics3D Examples pages
Convert a vertex only .m file, and view it
m2off color_cylinder.m | antiview -v 0.14
Show back face colors and start with the same viewpoint that
LiveGraphics3D does
m2off -b -v color_cube.m | antiview
If faces in the .m file are displayed using LiveGraphics3D lighting
it is possible that they may not also have particular colours
assigned to them. In this case the colour used in the OFF file will
be inherited from another element. It is likely that this will not be
what is wanted, in which case the faces can be recoloured using
off_color.
Please,
report any difficulties
in converting .m files.
m2off was written by
Roger Kaufman.
Up:
Programs and Documentation
Next:
off_color - adds colours to an OFF file
Antiprism Documentation 18.8.2007 -
http://www.antiprism.com/