diff options
Diffstat (limited to 'libdimension-python/tests/demo.py')
-rwxr-xr-x | libdimension-python/tests/demo.py | 16 |
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') |