Author: DavidCzech Date: 2008-03-19 13:18:49 -0400 (Wed, 19 Mar 2008) New Revision: 1180
Added: trunk/pysoy/examples/pysoy_primer.py Log: PySoy Primer added to examples Added: trunk/pysoy/examples/pysoy_primer.py =================================================================== --- trunk/pysoy/examples/pysoy_primer.py (rev 0) +++ trunk/pysoy/examples/pysoy_primer.py 2008-03-19 17:18:49 UTC (rev 1180) @@ -0,0 +1,19 @@ +## The PySoy Primer Tutorial +# +# This version has been modified to work with the lastest +# svn trunk. + +import soy +scr = soy.Screen() +win = soy.Window(scr,"Test Window") +sce = soy.scenes.Scene() +cube = soy.shapes.Box(1,1,1) # Step 1: Shape +mat = soy.materials.Material()# Step 2: Material +mat.shininess = 5 # Looks nicer :D +body =soy.bodies.Body(scene=sce,model=soy.models.Shape(mat),shape=cube) # Step 3: Body +light = soy.bodies.Light(sce) +camera = soy.bodies.Camera(sce) +pro = soy.widgets.Projector(win,camera=camera) +camera.position = (0,0,5.0) +light.position = (0.5, 1.0, 5.0) +body.rotation = (1,1,1) # Rotate the cube 1 unit in the X axis,1 unit in the Y axis and 1 unit in the Z axis \ No newline at end of file _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn