File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ # Turtle 101 - Intro to Turtles
2+
3+ # Turtle is a groovy graphics system that dates back to 1966.
4+
5+ # Imagine you are a turtle holding a pen.
6+
7+ # You can:
8+ # * Turn
9+ # * Move Forward
10+ # * Pick up the pen
11+
12+ # Using these fundamental basics, we can theoretically draw any shape.
13+
14+ # Let's start simple, by drawing a line
15+ turtle forward 42 save ./ line.svg
16+
17+ # Let's draw a line and take a few turns
18+ turtle forward 42 rotate 120 forward 42 rotate 120 forward 42 rotate 120 stroke ' #4488ff' save ./ triangle.svg
19+
20+ # Let's make a square
21+ turtle forward 42 rotate 90 forward 42 rotate 90 forward 42 rotate 90 forward 42 rotate 90 stroke ' #4488ff' save ./ square.svg
22+
23+ # Now let's do it the easier way, with square
24+ turtle square 42 stroke ' #4488ff' save ./ square2.svg
25+
26+ # Now let's do it the general way, with polygon
27+ turtle polygon 42 4 stroke ' #4488ff' save ./ square4.svg
28+
29+ # Our turtle is pretty smart, and so it can draw a lot of shapes for us.
30+
31+ # A classic example is a 'flower', which repeats many polygons
32+ turtle flower stroke ' #4488ff' save ./ flower.svg
33+
34+
35+
36+
37+
You can’t perform that action at this time.
0 commit comments