demos/demo.py
branchpyrit
changeset 14 fc18ac4833f2
parent 6 d8d596d26f25
child 19 4e0955fca797
--- a/demos/demo.py	Sat Nov 24 23:55:54 2007 +0100
+++ b/demos/demo.py	Sun Nov 25 15:50:01 2007 +0100
@@ -3,7 +3,7 @@
 import sys
 sys.path.append("..")
 
-from raytracer import Raytracer, Material, Plane, Sphere, Light
+from raytracer import Raytracer, Material, Box, Sphere, Light
 #, SphericalLight
 import Image
 
@@ -17,8 +17,8 @@
 rt.addlight(light2)
 
 mat0 = Material(colour=(0.1, 0.2, 0.9))
-plane = Plane(normal=(0.0, 1.0, 0.0), d=1.0, material=mat0)
-rt.addshape(plane)
+box = Box(L=(-20.0, -1.2, -20.0), H=(20.0, -1.0, 20.0), material=mat0)
+rt.addshape(box)
 
 mat1 = Material(colour=(1.0, 0.2, 0.1))
 bigsphere = Sphere(centre=(2.0, 2.0, 5.0), radius=2.5, material=mat1)
@@ -42,4 +42,4 @@
 rendersize = (800, 600)
 data = rt.render(rendersize)
 img = Image.fromstring("RGB", rendersize, data)
-img.save('out.png')
+img.save('demo.png')