summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Cichon <ebrasca.ebrasca@gmail.com>2015-10-07 02:14:25 +0200
committerBruno Cichon <ebrasca.ebrasca@gmail.com>2015-10-07 02:14:25 +0200
commit080cbfd982ef451429224f25e12250941216bb26 (patch)
treef3e70f3369e190262a759816a6152517d9f8c224
parentf4915a2202797ed697308f382dba8c2c31e4bbf7 (diff)
Small fix for rotate left on axis x
-rw-r--r--src/turtle-system.lisp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/turtle-system.lisp b/src/turtle-system.lisp
index 807986b..569492d 100644
--- a/src/turtle-system.lisp
+++ b/src/turtle-system.lisp
@@ -5,6 +5,7 @@
;;;(matrix* translate rotate scale)
(export 'f)
+(export 'q)
(export '[)
(export '])
@@ -13,7 +14,7 @@
(with vec-x = (sb-cga:vec 1.0 0.0 0.0))
(with vec-y = (sb-cga:vec 0.0 1.0 0.0))
(with vec-z = (sb-cga:vec 0.0 0.0 1.0))
- (with pile = '())
+ (with stack = '())
(with angle = radians)
(for item in list)
(case item
@@ -53,7 +54,7 @@
(setf vec-z
(vec-rotate-around vec-z vec-y (- angle))))
;;Rotate left on axis x
- ((\ )
+ ((q)
(setf vec-z
(vec-rotate-around vec-z vec-x angle))
(setf vec-y
@@ -67,10 +68,10 @@
;;Push the current turtle state onto a stack
(([)
(push (list pos vec-x vec-y vec-z)
- pile))
+ stack))
;;Pop the turtle stack, restoring an earlier state
((])
- (let* ((asd (pop pile))
+ (let* ((asd (pop stack))
(pos0 (pop asd))
(vec-x0 (pop asd))
(vec-y0 (pop asd))