The Tachyon Ray Tracer


  • 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=’‘)


  • model - a string that describes a 3d model in the Tachyon modeling format. Type 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.


  • Some text may be displayed onscreen.

  • The file outfile is created.


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

This executes the tachyon program, given a scene file 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.


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]
sage: t = TachyonRT()
sage: import os
sage: t(tgen.str(), outfile=os.devnull)
tachyon ...
Tachyon Parallel/Multiprocessor Ray Tracer...

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


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.