The Tachyon Ray Tracer

AUTHOR:

  • John E. Stone

class sage.interfaces.tachyon.TachyonRT

Bases: sage.structure.sage_object.SageObject

The Tachyon Ray Tracer

tachyon_rt(model, outfile=’sage.png’, verbose=1, block=True, extra_opts=’‘)

INPUT:

  • model - a string that describes a 3d model in the Tachyon modeling format. Type tachyon_rt.help() for a description of this format.

  • outfile - (default: ‘sage.png’) output filename; the extension of the filename determines the type. Supported types include:

    • tga - 24-bit (uncompressed)

    • bmp - 24-bit Windows BMP (uncompressed)

    • ppm - 24-bit PPM (uncompressed)

    • rgb - 24-bit SGI RGB (uncompressed)

    • png - 24-bit PNG (compressed, lossless)

  • verbose - integer; (default: 1)

    • 0 - silent

    • 1 - some output

    • 2 - very verbose output

  • block - bool (default: True); if False, run the rendering command in the background.

  • extra_opts - passed directly to tachyon command line. Use tachyon_rt.usage() to see some of the possibilities.

OUTPUT:

  • Some text may be displayed onscreen.

  • The file outfile is created.

EXAMPLES:

__call__(model, outfile='sage.png', verbose=1, extra_opts='')

This executes the tachyon program, given a scene file input.

INPUT:

  • model – string. The tachyon model.

  • outfile – string, default 'sage.png'. The filename to save the model to.

  • verbose – 0, 1, (default) or 2. The verbosity level.

  • extra_opts – string (default: empty string). Extra options that will be appended to the tachyon commandline.

EXAMPLES:

sage: from sage.interfaces.tachyon import TachyonRT
sage: tgen = Tachyon()
sage: tgen.texture('t1')
sage: tgen.sphere((0,0,0),1,'t1')
sage: tgen.str()[30:40]
'resolution'
sage: t = TachyonRT()
sage: import os
sage: t(tgen.str(), outfile=os.devnull)
tachyon ...
Tachyon Parallel/Multiprocessor Ray Tracer...
help(use_pager=True)

Prints (pages) the help file written by John Stone describing scene files for Tachyon. The output is paged unless use_pager=False.

usage(use_pager=True)

Returns the basic description of using the Tachyon raytracer (simply what is returned by running tachyon with no input). The output is paged unless use_pager=False.