add up to square 2
authordaniel watson <ozzloy@gmail.com>
Thu, 5 May 2016 21:19:49 +0000 (14:19 -0700)
committerdaniel watson <ozzloy@gmail.com>
Sat, 11 Jun 2016 05:00:22 +0000 (22:00 -0700)
curriculum/makefile
curriculum/square.scm

index af9ec43db43b88f5648febe18e38eb6e1ccd182c..3fc87962b2d7a8ac7bdee6f5fcbe349cf838ecee 100644 (file)
@@ -6,7 +6,23 @@ square.png: square.scad makefile
          --imgsize=931,634 \
          square.scad
 
-square.html: square.scm square.png makefile
+square1.png: square1.scad makefile
+       @openscad \
+         --render \
+         -o square1.png \
+          --camera=0.80,0.88,0.01,0,0,0,9.05 \
+         --imgsize=931,634 \
+         square1.scad
+
+square2.png: square2.scad makefile
+       @openscad \
+         --render \
+         -o square2.png \
+          --camera=0.80,0.88,0.01,0,0,0,9.05 \
+         --imgsize=931,634 \
+         square2.scad
+
+square.html: square.scm square.png square1.png square2.png makefile
        @skribilo square.scm > square.html
 
 clean:
index 04bb47b53dd0108370fa6de888627feb7aba5a43..a8fa36d73c33a8b567244b931993dbc86555ecd7 100644 (file)
@@ -1,3 +1,32 @@
-(document :title [square]
-  (chapter :title [square()\;]
-           (image :file "square.png" :height 400)))
+(use-modules (skribilo source c))
+
+(document
+ :title [square]
+ (chapter
+  :title (source :language c [square()\;])
+  (p [here's the output of ,(prog (source :language c [square()\;]))])
+  (figure
+   :legend "square();"
+   (image :file "square.png" :height 500))
+  (p [openscad draws  a square for the code
+               ,(source :language c [square()\;]).])
+  (p [there are a couple other things worth noting here.
+            square is followed by an open and close parenthesis
+            ,(source :language c [()]), and then by a semicolon
+            ,(source :language c [\;])]))
+ (chapter
+  :title [square(1)\;]
+  (p [here's the output of ,(source :language c [square(1)\;])])
+  (figure
+   :legend "square(1);"
+   (image :file "square1.png" :height 500))
+  (p [note that it's identical to the
+           ,(source :language c [square()\;]) output.  this is because
+           by default, openscad guesses a value of 1 whenever a value
+           is left unspecified.]))
+ (chapter
+  :title [square(2)\;]
+  (p [here's the output of ,(source :language c [square(2)\;])])
+  (figure
+   :legend "square(2);"
+   (image :file "square2.png" :height 500))))