From 9f0b74d5174c53e38392abeae913ccf25f3f967e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 17 Jun 2011 12:13:15 -0600 Subject: Add pigment= and finish= shorthand to Object.__init__(). --- libdimension-python/tests/demo.py | 44 ++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 24 deletions(-) (limited to 'libdimension-python/tests') diff --git a/libdimension-python/tests/demo.py b/libdimension-python/tests/demo.py index 7cecb07..700fd8b 100755 --- a/libdimension-python/tests/demo.py +++ b/libdimension-python/tests/demo.py @@ -82,22 +82,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)) @@ -121,14 +119,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)) + ], ), ) -- cgit v1.2.3