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!
==Extension to three dimensions== [[File:Spheres-turtle.png|thumb|[[3D computer graphics|3D turtle graphics]] generated with [[Cheloniidae Turtle Graphics]]]] [[File:Square pattern.png|thumb|left|Pattern drawn with a Python program]] The ideas behind turtle graphics can be extended to include three-dimensional space. This is achieved by using one of several different coordinate models. A common setup is cartesian-rotational as with the original 2D turtle: an additional "up" vector ([[normal vector]]) is defined to choose the plane the turtle's 2D "forward" vector rotates in; the "up" vector itself also rotates around the "forward" vector. In effect, the turtle has two different heading angles, one within the plane and the other determining the plane's angle. Usually changing the plane's angle does not move the turtle, in line with the traditional setup. Verhoeff 2010<ref>{{cite journal |last1=Verhoeff |first1=Tom |title=3D turtle geometry: artwork, theory, program equivalence and symmetry |journal=International Journal of Arts and Technology |date=2010 |volume=3 |issue=2/3 |pages=288β319 |doi=10.1504/IJART.2010.032569 |access-date=28 February 2021 |url=https://www.researchgate.net/publication/249923159}}</ref> implements the two vector approach; a ''roll'' command is used to rotate the "up" vector around the "forward" vector. The article proceeds to develop an algebraic theory to prove geometric properties from syntactic properties of the underlying turtle programs. One of the insights is that a ''dive'' command is really a shorthand of a turn-roll-turn sequence. Cheloniidae Turtle Graphics is a 3D turtle library for [[Java (programming language)|Java]]. It has a ''bank'' command (same as ''roll'') and a ''pitch'' command (same as ''dive'') in the "Rotational Cartesian Turtle". Other coordinate models, including non-Euclidean geometry, are allowed but not included.<ref>[http://spencertipping.com/cheloniidae/ Spencer Tipping on cheloniidae](retrieved 2016-9-17)</ref> {{clear right}}
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)