diff options
Diffstat (limited to 'dimension')
-rw-r--r-- | dimension/client.py.in | 3 | ||||
-rw-r--r-- | dimension/tests/complex.dmnsn | 14 | ||||
-rw-r--r-- | dimension/tests/demo.dmnsn | 6 |
3 files changed, 13 insertions, 10 deletions
diff --git a/dimension/client.py.in b/dimension/client.py.in index 2eaf3c3..9f68198 100644 --- a/dimension/client.py.in +++ b/dimension/client.py.in @@ -107,7 +107,8 @@ def main(): "objects" : [], "lights" : [], "camera" : PerspectiveCamera(), - "default_texture" : Texture(finish = Ambient(0.1) + Diffuse(0.7)), + "default_texture" : Texture(finish = Ambient(sRGB(0.1)) + + Diffuse(sRGB(0.7))), "default_interior" : Interior(), "background" : Black, "recursion_limit" : None, 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)) ) ) diff --git a/dimension/tests/demo.dmnsn b/dimension/tests/demo.dmnsn index 3a04abc..75a97a7 100644 --- a/dimension/tests/demo.dmnsn +++ b/dimension/tests/demo.dmnsn @@ -33,7 +33,7 @@ background = PigmentMap( pattern = Gradient(Y), map = { 0: image_map, - 0.35: Color(0, 0.1, 0.2, trans = 0.1, filter = 0.0), + 0.35: sRGB(0, 0.1, 0.2, trans = 0.1, filter = 0.0), }, ) @@ -50,8 +50,8 @@ hollow_cube = Difference( (-1, -1, -1), (1, 1, 1), texture = Texture( - pigment = Color(0, 0, 1, trans = 0.75, filter = 1/3), - finish = Reflection(min = 0, max = 0.5), + pigment = sRGB(0, 0, 1, trans = 0.75, filter = 1/3), + finish = Reflection(min = 0, max = sRGB(0.5)), ), interior = Interior( ior = 1.1, |