TOPICS
Search

Turtle Geometry


Turtle geometry is a method of describing curves by successive motions of a point with a heading, specifying how far it moves and how much it turns (Abelson and diSessa 1981). Each turn is relative to the moving point's current direction, so a fixed instruction list can be repeated from any initial position and direction. The mathematical framework underlies turtle graphics.

TurtleGeometry

The figure shows an equilateral triangle, a square, and a spirolateral constructed using left turns. Arrows indicate the direction of travel, and orange dots mark the starting points. The examples are shown at independent scales.

In a complex plane description, the heading is measured from a fixed reference axis. A straight move of length l_j followed by a turn through angle alpha_j updates the position z_j and heading phi_j by

z_(j+1)=z_j+l_je^(iphi_j)
(1)
phi_(j+1)=phi_j+alpha_j.
(2)

Repeating a finite instruction list applies the same rigid motion to each successive copy of its trace. A nontrivial rotation of finite order produces a closed trace after finitely many copies. A nonzero translation instead produces an unbounded chain, while the identity transformation repeats the trace in place. The total turn alone does not distinguish the last two cases.

Integer sequences can supply the turns or move lengths (Colestock 2017). Basic spirolaterals use a fixed turn and a repeating list of move lengths. The N-curve construction instead uses circular arcs of equal arc length whose turns are determined by residues of an integer sequence.

The Wolfram Language function AnglePath[steps] generates planar turtle paths by turning before each move. The function AnglePath3D[steps] extends the construction to space using successive rotations of a moving coordinate frame.


See also

N-Curve, Plane Curve, Rigid Motion, Spirolateral

Explore with Wolfram|Alpha

References

Abelson, H. and diSessa, A. A. Turtle Geometry: The Computer as a Medium for Exploring Mathematics. Cambridge, MA: MIT Press, 1981.Colestock, A. "Let the Numbers Do the Walking: Generating Turtle Dances on the Plane from Integer Sequences." In Proc. Bridges 2017: Mathematics, Art, Music, Architecture, Education, Culture (Ed. D. Swart, C. Séquin, and K. Fenyvesi). Phoenix, AZ: Tessellations Publishing, pp. 139-146, 2017. https://archive.bridgesmathart.org/2017/bridges2017-139.pdf.

Cite this as:

Weisstein, Eric W. "Turtle Geometry." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/TurtleGeometry.html

Subject classifications