File: hilbert.py

package info (click to toggle)
pythoncard 0.8.1-8.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 5,352 kB
  • ctags: 4,594
  • sloc: python: 42,401; makefile: 55; sh: 22
file content (13 lines) | stat: -rw-r--r-- 298 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
# example derived from
# Turtle Geometry: The Computer as a Medium for Exploring Mathematics
# by Harold Abelson and Andrea diSessa
# p. 96-98

from wrappers import CurvesTurtle

def draw(canvas):
    t = CurvesTurtle(canvas)
    t.cls()
    t.moveTo(50, 50)
    t.right(90)
    t.hilbert(5, 6, 1)