Antiprism Up Next
Home
Programs
Examples
Album
Download
Development
Forum
About

Antiprism Resource Files

Resources    |    Access    |    Models    |    Colour Maps    |    Lights    |    POV-Ray Incs    |    Extras

Antiprism Resources

Antiprism includes a number of resources, which are either internal or external. Internal resources are accessed by name and are generated by Antiprism. External resources are support files distributed with Antiprism. They are actual files and can be accessed directly. They are useful as examples and as a starting point for creating new resources.

Nearly all the resource files may be used, modified and redistributed without restriction (check the begining of each resource file for details.)

Please, send me any resources that you create and would like to share with other Antiprism users.

Accessing the Resources

If Antiprism has been installed then the external resources are automatically available by their names. The resource names are case insensitive. If Antiprism is not installed then set the ANTTIPRISM_DATA environment variable to point to the share directory of the Antiprism distribution.

How to set this variable will depend on your system.

  • Example DOS command
    set ANTIPRISM_DATA="c:\some\dir\antiprism-0.xx\share"
  • Example bash command
    export ANTIPRISM_DATA="/home/user/antiprism-0.xx/share"
Otherwise, the resource files are just ordinary files so simply give the full path to the resource you want to use.

When you specify a filename the program will look for the file in three places in this order

  1. The current working directory
  2. The relevant directory in ANTTIPRISM_DATA (if set)
  3. The relevant directory in the installed data directory (if installed)
A data directory may include a file called alt_names.txt. This contains a list of alternative names for the files in that particular data directory. The resource name is searched for in the alternative names if it does not refer to a file in the directory. The format is alt_name = file_name.

Models

Directory: models

Internal model resources include

  • Platonic, Archimedean and other Uniform polyhedra (see off_util -H uniform)
  • Johnson polyhedra (see off_util -H johnson)
  • Polygon-based polyhedra such as prisms, antiprisms, pyramids, dipyramids, cupolas, orthobicupolas, gyrobicupolas and snub-antiprisms (see off_util -H polygon)

The resource directory includes Bower's short names for the uniform polyhedra.

Colour Maps

Directory: col_maps

OFF elements may be coloured by index numbers. Colour maps provide a way to convert these index numbers into colour values. As well as the Antiprism colour map format the progams also understand Gimp Palette format and Fractint colour maps. Colour maps are used by off_color -m, antiview -m and n_icons -M.

X11 (549 colours)
Broad range of named colours from X11's rgb.txt. The names may also be used to specify colours on the command line.

html (140 colours)
Broad range of colours. These are the colours that can be used by name in HTML.

jumble (100 colours)
Broad range of colours, with adjacent colours not alike.

5levels (125 colours)
The combinations of five levels each of red, green and blue

ms (48 colours)
A color map based on the Micosoft color dialog.

grey16, grey64, grey256 (16, 64, 256 colours)
Grey scales running from black to white

grey_wrap16, grey_wrap64, grey_wrap256 (16, 64, 256 colours)
Grey scales running from black to white and back again.

rainbow, rainbowg, rainbowc (256 colours)
Vivid rainbows that wrap. rainbow has the full range of colours, rainbowg emphasises green and lacks cyan, rainbowc emphasises cyan and lacks green.

spectrum (401 colours)
Colours from the spectrum.

iscc (267 colours)
NBS/ISCC color system centroids chart of named colours.

vga (267 colours)
Original VGA named colours.
More colour maps are available from Colorzilla Palettes.

Lights

Directory: col_lights

Lights are OFF files whose vertex elements are coloured. These colours are taken as lights in the direction of the vertices, and are used to colour the elements of other OFF files. Lights are used by off_color -l.

default
Red, green and blue opposite their complements on the vertices of an octahedron. This makes a rainbow effect on a sphere, and is the default lighting in off_color.

lg3d
Lighting similar to LiveGraphics3D lighting effect.

rgbw
Red, green, blue, and white on the vertices of a tetrahedron.

pastel
Like default but using pastel colours for a softer rainbow effect.

POV-Ray Include Files

Antiprism will convert OFF files to POV-Ray format. The POV-Ray file is written in such a way that much of the final presentation can be modified after the file is written. One way to override the defaults and preset values is with POV-Ray include files. POV-Ray include files are used by off2pov. See especially POV-Ray file structure.

Some include files have user configurable variables. These are described at the start of the file. They can be set in several ways -

  • on the POV-Ray command line, if the variable holds a floating point e.g.
    povray Declare=some_val=1.0 file.pov
  • in another include file, which is included earlier. It may be convenient to create the file on the command line e.g.
    echo "#declare some_tex=texture{T_Brass_4A}">default_pov.inc && povray file.pov
  • in the include file itself, which should be copied elsewhere and the modifications applied to the copy.
rot90.inc
faces are converted to a ring around the face normal at the centroid, struts lead to the face's edge centres. Edges are convverted to a ring around the edge at the edge centre.

Extras

The extra resources are unsupported, and provided for interest only. They may be useful as examples. Programs or scripts may require modification before they will work. For further details see the Extras README file.


     Next: Antiprism Resources - Extras
     Up: Programs and Documentation


Home   |   Programs   |   Examples   |   Album   |   Download   |   Development   |   Forum   |   About

Contact: adrian@antiprism.com      -      Modified 12.9.2016