Up    Next

off_color - adds colours to an OFF file

Usage    |    Examples    |    Notes

Usage

Synopsis

off_color [options] [input_files]

Description

Read a file in OFF format and add colours to it.

Options

input_file
input file in OFF format, or if not given the program reads from stdin

-h
program help

-v <col>
colour the vertices according to

-f <col>
colour the faces according to

-e <col>
create digons for edges and colour according to

-s <sch>
use the colour scheme given by a number (all numbers have a scheme), or if 0 then use a scheme chosen at random

-m <file>
map colour indexes into colour values using colour map file, which contains a list of mappings in the format index_number = colour e.g.
   9 = 0.5 1.0 0.0
with one mapping per line (implies -c which defaults to 2).

-c <conv>
convert indexes after all processing, can be:

-H <range>
range for hue in generated color map, one or two values, (separated by a comma) between 0.0 and 1.0 (default:0.0,1.0)

-S <range>
range for saturation in generated color map, one or two values, (separated by a comma) between 0.0 and 1.0 (default:0.7,1.0)

-V <range>
range for hue in generated color map, one or two values, (separated by a comma) between 0.0 and 1.0 (default:0.7,1.0)

-o <file>
write output to file, if this option is not used the program writes to standard output

Examples

Make a cuboctahedron with the triangle faces a different colour to the square faces
   unipoly cuboctahedron | off_color -f N -o cubo.off
Same again, but make the colours black and white. Create a file called my_colormap.txt with these two lines which convert index numbers into colour values (with the -f n option faces have an index number the same as their number of sides).
   3 = 0.0 0.0 0.0
   4 = 1.0 1.0 1.0
Now the command is
   unipoly cuboctahedron | off_color -f n -m my_colormap.txt -o cubo.off
Colour faces with unique colours
   geodesic 2 | off_color -f U | antiview -x ve
May a blue-green range for U by specifying a range of the hue
   geodesic 2 | off_color -f U -H 0.4,0.7| antiview -x ve
Make pastel colours for U by decreasing the saturation
   geodesic 2 | off_color -f U -S 0.4| antiview -x ve
Make dark colours for U by decreasing the value
   geodesic 2 | off_color -f U -V 0.4 -S 1| antiview -x ve
Choose from all possible colours for U by giving the full ranges of H, S and V
   geodesic 2 | off_color -f U -H 0,1 -S 0,1 -V 0,1| antiview -x ve

Notes

In some situations, especially when using -H, -S and -V together, the colours assigned may be noticeably non-random.

Up: Programs and Documentation
Next: off_trans - transformations (rotations, etc) of OFF files

Antiprism Documentation 23.2.2007 - http://www.antiprism.com/