summaryrefslogtreecommitdiffstats
path: root/dimension/tests/demo.dmnsn
diff options
context:
space:
mode:
Diffstat (limited to 'dimension/tests/demo.dmnsn')
-rw-r--r--dimension/tests/demo.dmnsn22
1 files changed, 9 insertions, 13 deletions
diff --git a/dimension/tests/demo.dmnsn b/dimension/tests/demo.dmnsn
index fbf51da..331c2b4 100644
--- a/dimension/tests/demo.dmnsn
+++ b/dimension/tests/demo.dmnsn
@@ -20,7 +20,7 @@
# Camera
camera = PerspectiveCamera(location = (0, 0.25, -4),
look_at = 0)
-camera.transform(rotate(53*Y))
+camera.rotate(53*Y)
# Background
background = PigmentMap(
@@ -51,7 +51,7 @@ hollow_cube = Difference(
ior = 1.1,
),
)
- .transform(rotate(45*X)),
+ .rotate(45*X),
Sphere(
center = 0, radius = 1.25,
@@ -84,19 +84,15 @@ arrow = Union(
6/6: Red,
},
)
- .transform(scale(1, 2.75, 1))
- .transform(translate(-1.25*Y)),
+ .scale(1, 2.75, 1)
+ .translate(-1.25*Y),
)
torii = Union(
[
- Torus(major_radius = 0.15, minor_radius = 0.05)
- .transform(translate(-Y)),
-
+ Torus(major_radius = 0.15, minor_radius = 0.05).translate(-Y),
Torus(major_radius = 0.15, minor_radius = 0.05),
-
- Torus(major_radius = 0.15, minor_radius = 0.05)
- .transform(translate(Y)),
+ Torus(major_radius = 0.15, minor_radius = 0.05).translate(Y),
],
texture = Texture(
pigment = Blue,
@@ -104,7 +100,7 @@ torii = Union(
),
)
-spike = Union([arrow, torii]).transform(rotate(-45*X))
+spike = Union([arrow, torii]).rotate(-45*X)
strip_textures = [
Texture(pigment = Red),
@@ -122,7 +118,7 @@ for i in range(128):
b = c
c = a + Z
-strip = Union(strip_triangles).transform(translate(5, -2, -4))
+strip = Union(strip_triangles).translate(5, -2, -4)
ground = Plane(
normal = Y, distance = -2,
@@ -131,7 +127,7 @@ ground = Plane(
Checker(),
[
White,
- PigmentMap(Checker(), [Black, White]).transform(scale(1/3))
+ PigmentMap(Checker(), [Black, White]).scale(1/3)
],
),
)