Category talk:Jq-turtle: Difference between revisions

(def turtleMove())
Line 5:
include "turtle" {search: "."};
</pre>
 
For an illustration of how to use the functions defined here, see
[[Koch_curve]].
 
<pre>
Line 85 ⟶ 88:
| turtleRotate(90);
 
#################################################################################
 
def svg($size):
"<svg viewBox=\"0 0 \($size) \($size)\" xmlns=\"http://www.w3.org/2000/svg\">",
.,
"</svg>";
 
def path($fill; $stroke; $width):
"<path fill=\"\($fill)\" stroke=\"\($stroke)\" stroke-width=\"\($width)\" d=\"\(.svg)\" />";
 
def draw($size):
path("none"; "red"; 1) | svg($size);
 
#################################################################################
 
def svg($size):
2,447

edits