1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import Tkinter
# Set up the graphics window
maxheight = 500
maxwidth = 1000
window = Tkinter.Tk()
canvas = Tkinter.Canvas(window, width=maxwidth, height=maxheight, background="white")
canvas.pack()
#Set up parameters and initial popsize
maxtime = 500
R = 1.0125
N = 1
for time in range(1,maxtime+1):
Nnext = N * R #Here is the dynamic!
print Nnext
canvas.create_line(time, maxheight-N, time+1, maxheight-Nnext) #Graph it
N = Nnext |
