summaryrefslogtreecommitdiffstats
path: root/libdimension-python/tests/demo.py
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-22 14:22:07 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-22 14:22:07 -0600
commit1bf306d4d93cc21c220a3f31835023e49e84dd2d (patch)
tree436959a8321100a3c36e8eef9a19279cb446e1fa /libdimension-python/tests/demo.py
parent0f0b704144bddc045657f7ed852b49d5e349b0bd (diff)
downloaddimension-1bf306d4d93cc21c220a3f31835023e49e84dd2d.tar.xz
Add cameras, objects, and spheres to Python module.
Diffstat (limited to 'libdimension-python/tests/demo.py')
-rwxr-xr-xlibdimension-python/tests/demo.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/libdimension-python/tests/demo.py b/libdimension-python/tests/demo.py
index 187f4ef..982fa60 100755
--- a/libdimension-python/tests/demo.py
+++ b/libdimension-python/tests/demo.py
@@ -35,4 +35,18 @@ except OSError as e:
else:
raise
-scene = Scene(canvas = canvas)
+camera = PerspectiveCamera(location = (0, 0.25, -4),
+ look_at = Zero)
+camera.transform(rotate(53*Y))
+
+objects = []
+
+sphere = Sphere(radius = 1, center = Zero)
+objects.append(sphere)
+
+scene = Scene(canvas = canvas,
+ camera = camera,
+ objects = objects)
+scene.raytrace()
+
+canvas.writePNG('demo.png')