#!/usr/bin/env pyscript

# $Id: tex.py,v 1.4 2006/02/14 14:23:09 paultcochrane Exp $

Example showing off the TeX object.  This shows a series of TeX objects of a
mathematical description of a wavefunction (but you don't need to know that)
placed at various angles in a circle, with a blue background.

# import the pyscript libraries
from pyscript import *

# define the default units for the diagram

# define a TeX object
tex = TeX(r'$|\psi_t\rangle=e^{-iHt/\hbar}|\psi_0\rangle$',
        w=P(.5,0), fg=Color(1))

# define the group of objects to render
g = Group()
for ii in range(0, 360, 60):
    g.append(tex.copy().rotate(ii, P(0,0)))

# render the diagram
        # one circle
        Circle(r=.6+tex.width, bg=Color('midnightblue')), 

        # the TeX object

        # another circle
        Circle(r=.4, bg=Color(1)),

        # the output file name

# vim: expandtab shiftwidth=4:

Generated by GNU enscript 1.6.4.