summaryrefslogtreecommitdiffstats
path: root/dimension/tests/cube.dmnsn
diff options
context:
space:
mode:
Diffstat (limited to 'dimension/tests/cube.dmnsn')
-rw-r--r--dimension/tests/cube.dmnsn14
1 files changed, 7 insertions, 7 deletions
diff --git a/dimension/tests/cube.dmnsn b/dimension/tests/cube.dmnsn
index 5f74219..65387ab 100644
--- a/dimension/tests/cube.dmnsn
+++ b/dimension/tests/cube.dmnsn
@@ -42,20 +42,19 @@ objects.append(
)
)
-class ShinySphere(Sphere):
+class ShinySphere(Teapot):
def __init__(self, x, y, z, size):
size -= 1
dx = sin(2*pi*x/size)
dy = sin(2*pi*y/size)
dz = sin(2*pi*z/size)
- Sphere.__init__(
+ center = (5*Vector(x, y, z)/size
+ + Vector(dy + dz, dx + dz, dx + dy)/4
+ - Vector(2.5, 2.5, 2.5))
+ radius = 2/size
+ Teapot.__init__(
self,
- center = 5*Vector(x, y, z)/size
- + Vector(dy + dz, dx + dz, dx + dy)/4
- - Vector(2.5, 2.5, 2.5),
- radius = 2/size,
-
texture = Texture(
pigment = sRGB(x/size, y/size, z/size),
finish = Ambient(sRGB(0.25))
@@ -63,6 +62,7 @@ class ShinySphere(Sphere):
+ Reflection(0, 0.25)
)
)
+ self.scale(radius/2).translate(center)
size = 10
for x in range(size):