3
# [SNIPPET_NAME: Chaos]
4
# [SNIPPET_CATEGORIES: PyTurtle]
5
# [SNIPPET_DESCRIPTION: Use turtle to graph chaos.]
6
# [SNIPPET_DOCS: http://docs.python.org/library/turtle.html]
7
# [SNIPPET_AUTHOR: Grant Bowman <grantbow@ubuntu.com>]
8
# [SNIPPET_LICENSE: PSF]
9
# Code authorship from http://python.org/download/releases/2.6.4/
12
# File: tdemo_chaos.py
13
# Author: Gregor Lingl
16
# A demonstration of chaos
34
def line(x1, y1, x2, y2):
43
def plot(fun, start, colour):
56
setworldcoordinates(-1.0,-0.1, N+1, 1.1)
61
plot(g, 0.35, "green")
65
setworldcoordinates(0.5*s,-0.1, N+1, 1.1)
68
if __name__ == "__main__":