Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Turtle graphics
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==History== Turtle graphics are often associated with the [[Logo programming language]].<ref name="thornburg198303">{{cite news | url=http://www.atarimagazines.com/compute/issue34/068_1_FRIENDS_OF_THE_TURTLE.php | title=Friends of the Turtle: On Logo And Turtles | work=Compute! | date=March 1983 | accessdate=6 October 2013 | author=Thornburg, David D. | pages=148}}</ref> [[Seymour Papert]] added support for turtle graphics to Logo in the late 1960s to support his version of the [[turtle (robot)|turtle robot]], a simple robot controlled from the user's workstation that is designed to carry out the drawing functions assigned to it using a small retractable pen set into or attached to the robot's body. Turtle geometry works somewhat differently from (''x'',''y'') addressed [[Cartesian geometry]], being primarily [[Vector (geometry)|vector]]-based (i.e. relative direction and distance from a starting point) in comparison to coordinate-addressed systems such as bitmaps or raster graphics. As a practical matter, the use of turtle geometry instead of a more traditional model mimics the actual movement logic of the turtle robot. The turtle is traditionally and most often represented pictorially either as a triangle or a turtle icon (though it can be represented by any icon). import turtle tina = turtle.Turtle() tina.shape('turtle') x = 1 tina.speed(10000) colors = ["red", "orange", "yellow", "green", "blue", "purple"] for i in range(100): for i in colors: tina.forward(x*.3) tina.left(60) tina.color(i) tina.right(30.5) x = x+1 Today, the [[Python (programming language)|Python]] programming language's standard library includes a Turtle graphics module.<ref>{{Cite web|url=https://docs.python.org/3.7/library/turtle.html|title=25.1. turtle β Turtle graphics β Python 3.7.0 documentation|website=docs.python.org|access-date=2018-08-23}}</ref> Like its Logo predecessor, the Python implementation of turtle allows programmers to control one or more turtles in a two-dimensional space. Since the standard Python syntax, control flow, and data structures can be used alongside the turtle module, turtle has become a popular way for programmers learning Python to familiarize themselves with the basics of the language.<ref>{{Cite web|url=https://python.camden.rutgers.edu/python_resources/python3_book/hello_little_turtles.html|title=3. Hello, little turtles! β How to Think Like a Computer Scientist: Learning with Python 3|website=python.camden.rutgers.edu|access-date=2018-08-23}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)