summaryrefslogtreecommitdiffstats
path: root/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-06-17 12:13:15 -0600
committerTavian Barnes <tavianator@gmail.com>2011-06-17 13:28:16 -0600
commit9f0b74d5174c53e38392abeae913ccf25f3f967e (patch)
treec9d07656a471e5dd95223fa51aed32e50ab686f7 /dimension
parent8a01c01119d134828c511ee68367b5b0e3bd094f (diff)
downloaddimension-9f0b74d5174c53e38392abeae913ccf25f3f967e.tar.xz
Add pigment= and finish= shorthand to Object.__init__().
Diffstat (limited to 'dimension')
-rw-r--r--dimension/tests/complex.dmnsn2
-rw-r--r--dimension/tests/demo.dmnsn44
2 files changed, 21 insertions, 25 deletions
diff --git a/dimension/tests/complex.dmnsn b/dimension/tests/complex.dmnsn
index 261052e..298f74b 100644
--- a/dimension/tests/complex.dmnsn
+++ b/dimension/tests/complex.dmnsn
@@ -58,7 +58,7 @@ def make_sphere(x, y, z, size):
texture = Texture(
pigment = Color(x/size, y/size, z/size),
- finish = Ambient(0.25) + Reflection(0.5)
+ finish = Reflection(0.5)
)
)
diff --git a/dimension/tests/demo.dmnsn b/dimension/tests/demo.dmnsn
index 47c0d76..c51e592 100644
--- a/dimension/tests/demo.dmnsn
+++ b/dimension/tests/demo.dmnsn
@@ -63,22 +63,20 @@ arrow = Union(
open = True
),
],
- texture = Texture(
- pigment = ColorMap(
- Gradient(Y),
- {
- 0/6: Red,
- 1/6: Orange,
- 2/6: Yellow,
- 3/6: Green,
- 4/6: Blue,
- 5/6: Magenta,
- 6/6: Red,
- },
- )
- .transform(scale(1, 2.75, 1))
- .transform(translate(-1.25*Y)),
- ),
+ pigment = ColorMap(
+ Gradient(Y),
+ {
+ 0/6: Red,
+ 1/6: Orange,
+ 2/6: Yellow,
+ 3/6: Green,
+ 4/6: Blue,
+ 5/6: Magenta,
+ 6/6: Red,
+ },
+ )
+ .transform(scale(1, 2.75, 1))
+ .transform(translate(-1.25*Y)),
)
arrow.transform(rotate(-45*X))
@@ -102,14 +100,12 @@ torii.transform(rotate(-45*X))
ground = Plane(
normal = Y, distance = -2,
- texture = Texture(
- pigment = PigmentMap(
- Checker(),
- [
- White,
- ColorMap(Checker(), [Black, White]).transform(scale(1/3))
- ],
- ),
+ pigment = PigmentMap(
+ Checker(),
+ [
+ White,
+ ColorMap(Checker(), [Black, White]).transform(scale(1/3))
+ ],
),
)