diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-12-04 18:43:52 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-12-04 19:07:48 -0500 |
commit | 176054363582b08aaf93bb4fcc0f26521c0f884c (patch) | |
tree | 98833973895f8b9838a1452156ec889f6a0f1dfd /dimension/tests/complex.dmnsn | |
parent | 003b3894abe2756541e9aac497058f491961bd17 (diff) | |
download | dimension-176054363582b08aaf93bb4fcc0f26521c0f884c.tar.xz |
Use a separate class for sRGB colors.
Diffstat (limited to 'dimension/tests/complex.dmnsn')
-rw-r--r-- | dimension/tests/complex.dmnsn | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/dimension/tests/complex.dmnsn b/dimension/tests/complex.dmnsn index b081d14..a5a3ec2 100644 --- a/dimension/tests/complex.dmnsn +++ b/dimension/tests/complex.dmnsn @@ -20,10 +20,10 @@ camera = PerspectiveCamera(location = (3, 6, -11), look_at = 0) -background = 0.5*Color(0.73, 0.90, 0.97) +background = 0.5*sRGB(0.73, 0.90, 0.97) def make_light(x, y, z): - return PointLight(location = (x, y, z), color = 1/4*White) + return PointLight(location = (x, y, z), color = White/4) for x in [-3, -1, 1, 3]: for y in [0, 5]: @@ -34,8 +34,8 @@ objects.append( normal = Y, distance = -4, texture = Texture( - pigment = Color(0.73, 0.90, 0.97), - finish = Ambient(0.5), + pigment = sRGB(0.73, 0.90, 0.97), + finish = Ambient(sRGB(0.5)), ) ) ) @@ -53,8 +53,10 @@ def make_sphere(x, y, z, size): radius = 2/size, texture = Texture( - pigment = Color(x/size, y/size, z/size), - finish = Ambient(0.25) + Diffuse(0.8) + Reflection(0.0, 0.25) + pigment = sRGB(x/size, y/size, z/size), + finish = Ambient(sRGB(0.25)) + + Diffuse(sRGB(0.8)) + + Reflection(0, sRGB(0.5)) ) ) |