summaryrefslogtreecommitdiffstats
path: root/dimension/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-07-13 13:47:17 -0600
committerTavian Barnes <tavianator@gmail.com>2011-07-13 13:47:17 -0600
commit3ec26ddd28cbcc279a4fa65de8d68c68b3950576 (patch)
treeeddc68447868b1c0dd9c7f357527a9e8c7670ff9 /dimension/tests
parentf034b0cba4c028b4b156f7d8824b6ccf84f1f277 (diff)
downloaddimension-3ec26ddd28cbcc279a4fa65de8d68c68b3950576.tar.xz
Implement triangles.
Diffstat (limited to 'dimension/tests')
-rw-r--r--dimension/tests/demo.dmnsn22
1 files changed, 22 insertions, 0 deletions
diff --git a/dimension/tests/demo.dmnsn b/dimension/tests/demo.dmnsn
index a85a96e..550c57a 100644
--- a/dimension/tests/demo.dmnsn
+++ b/dimension/tests/demo.dmnsn
@@ -17,6 +17,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
#########################################################################
+# Background
+background = Clear
+
# Camera
camera = PerspectiveCamera(location = (0, 0.25, -4),
look_at = 0)
@@ -97,6 +100,24 @@ torii = Union(
spike = Union([arrow, torii]).transform(rotate(-45*X))
+strip_textures = [
+ Texture(pigment = Red),
+ Texture(pigment = Orange),
+ Texture(pigment = Yellow),
+]
+strip_triangles = []
+
+a = 0
+b = Vector(0, sqrt(3)/2, 0.5)
+c = Z
+for i in range(128):
+ strip_triangles.append(Triangle(a, b, c, texture = strip_textures[i%3]))
+ a = b
+ b = c
+ c = a + Z
+
+strip = Union(strip_triangles).transform(translate(5, -2, -4))
+
ground = Plane(
normal = Y, distance = -2,
@@ -112,6 +133,7 @@ ground = Plane(
objects = [
hollow_cube,
spike,
+ strip,
ground,
]