![seymour papert logo programming language seymour papert logo programming language](https://originzx.files.wordpress.com/2015/09/historia-logo-01.jpg)
In turtle graphics, commands like right and forward are relative to the turtle.
![seymour papert logo programming language seymour papert logo programming language](https://blogs.sap.com/wp-content/uploads/2017/06/clipboard1-15.png)
Knowing the length and angle of a line does not tell us where it should be drawn. We can figure out the angle and length of a line from its start and end points, but we can’t go the other way. The second shift becomes apparent if we ask where the line in the second example should be drawn. This is one of the key shifts in thinking encouraged by turtle graphics. Now the line’s angle and length are specified instead of its start and end.
#Seymour papert logo programming language code#
This is code you might write to draw a line using a turtle: right ( 45 ) Turtle graphics flips these priorities around. Also note that these positions are absolute coordinates measured on the canvas. You can infer them, but they are not directly specified. The length and angle of the line are deprioritized. This prioritizes the x,y coordinates of the start and end of the line. To draw a line in p5.js you might use code like this: line ( 100, 100, 200, 200 ) Most graphics APIs-including p5.js-use a Cartesian coordinate system.