diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-12-21 15:51:47 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-12-21 15:52:06 -0500 |
commit | b602fff4133fd793b04839e4e0514c8c101fa50a (patch) | |
tree | e9023f73ef1170378d09130305fc72a561ce7ff2 /dimension/tests/cube.dmnsn | |
parent | babba43cd4d1b9c92a569f19acbe17e429193b01 (diff) | |
download | dimension-b602fff4133fd793b04839e4e0514c8c101fa50a.tar.xz |
Add teapots WIP.teapot
Diffstat (limited to 'dimension/tests/cube.dmnsn')
-rw-r--r-- | dimension/tests/cube.dmnsn | 14 |
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): |