generated from mwc/project_drawing
53 lines
1.5 KiB
Python
53 lines
1.5 KiB
Python
# drawing.py
|
|
# ----------
|
|
# By Stacy S
|
|
#
|
|
# (Drew a tree, and the leaves change colors.)
|
|
|
|
from turtle import *
|
|
from shapes import *
|
|
from superturtledraw import *
|
|
|
|
fly(0,-150)
|
|
|
|
colormode(255)
|
|
rcolor = 0
|
|
gcolor = 225
|
|
bcolor = 0
|
|
for bcolor in range(0,225,100):
|
|
with no_delay():
|
|
with restore_state_when_finished():
|
|
draw_tree_nl(25)
|
|
with restore_state_when_finished():
|
|
draw_tree_wl(25, rcolor, gcolor, bcolor)
|
|
for gcolor in range(225,0,-100):
|
|
with no_delay():
|
|
with restore_state_when_finished():
|
|
draw_tree_nl(25)
|
|
with restore_state_when_finished():
|
|
draw_tree_wl(25, rcolor, gcolor, bcolor)
|
|
for rcolor in range(0,225,100):
|
|
with no_delay():
|
|
with restore_state_when_finished():
|
|
draw_tree_nl(25)
|
|
with restore_state_when_finished():
|
|
draw_tree_wl(25, rcolor, gcolor, bcolor)
|
|
|
|
for bcolor in range(225,0,-100):
|
|
with no_delay():
|
|
with restore_state_when_finished():
|
|
draw_tree_nl(25)
|
|
with restore_state_when_finished():
|
|
draw_tree_wl(25, rcolor, gcolor, bcolor)
|
|
for gcolor in range(0,225,100):
|
|
with no_delay():
|
|
with restore_state_when_finished():
|
|
draw_tree_nl(25)
|
|
with restore_state_when_finished():
|
|
draw_tree_wl(25, rcolor, gcolor, bcolor)
|
|
for rcolor in range(225,0,-100):
|
|
with no_delay():
|
|
with restore_state_when_finished():
|
|
draw_tree_nl(25)
|
|
with restore_state_when_finished():
|
|
draw_tree_wl(25, rcolor, gcolor, bcolor) |