From b602fff4133fd793b04839e4e0514c8c101fa50a Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 21 Dec 2011 15:51:47 -0500 Subject: Add teapots WIP. --- dimension/tests/cube.dmnsn | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'dimension/tests/cube.dmnsn') 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): -- cgit v1.2.3