More Animation Lab #
In this lab we are going to continue to experiment with SuperTurtle
and exploring decomposition and abstraciton.
[0] Set Up #
๐ป Go to your
cs9/unit00_drawing
folder.
cd ~/desktop/making_with_code/unit00_drawing/
git clone https://github.com/the-isf-academy/lab_more_superturtle_yourGithubUsername
๐ป In the Terminal, type the following command to open the lab folder.Below you’ll see that the
git clone
command has ayourGithubUsername
.You need to replace this with your username
e.g.
https://github.com/the-isf-academy/lab_more_superturtle_emmaqbrown
cd lab_more_superturtle_yourGithubUsername
๐ป Enter the Poetry Shell to start the lab. We will run this command at the start of each lab, but only when we are inside a lab folder.
poetry shell
๐ป This lab uses a package called SuperTurtle. To use SuperTurtle in this repo, we must install it using poetry.
poetry install
๐พ ๐ฌ Exiting the poetry shellWhen you want to exit the shell, you can type
exit
or^D
๐ป Take a look at the files inside with:
ls
animation_tree.py
experiment.py
tree_parts.py
shapes.py
[1] Tree Animations #
This mini lab is designed to be a pick and choose adventure for practice animating with SuperTurtle
.
๐พ ๐ฌ DocumentationFor lab, we recommend referencing the previous lab repository,
lab_superturtle
, and the offical documentation.๐ SuperTurtle Documentation: superturtle.readthedocs.io/en/latest/animation.html
The offical documentation has a lot of information, so be sure to ask a teacher and experiment if you have any questions.
๐ป
Let’s start by running animation_tree.py
python animation_tree.py

๐ป
Take a look at the code with: code .
- The main animation loop is in
animation.py
. - It uses the
shapes.py
file andtree_parts.py
from themodules
lab.
๐ป Fist, add a moon!
- Look in
shapes.py
for a function you can use to draw the moon! - How will you move the moon across the screen?
- Reference the previous lab OR the documentation

๐ป Now move the moon!
- How can you use
translate
to move the moon across the screen?

๐ป
Edit the settings.py
file. Add the abilty to easily customize the moon size and color
- How do you use variables from
settings.py
inanimation_tree.py
?
TOTAL_FRAMES = 240
TREE_TOP_COLOR = (40, 112, 58)
TREE_TRUNK_COLOR = (100,40,0)
๐ป Now, create a forest of trees!
- You may keep the moon, or comment out the moon (
command + ?
) - You will need to use
nested for loops
andfly()

[2] Deliverables #
โกโจ For this lab, you should:โ๏ธ At then end of class, be sure to fill out this Google form.
๐ป Push your code to Github
git status
git add file.py
git status
git commit -m "describe changes here"
git push
[3] Experiment! #
๐ป
In experiment.py
, experiment by creating your own animation to create a new design using functions in shapes.py
. We included the starter code from the
documentation, but feel free to delete it and start fresh!
A few ideas…
- a face with eyes that move
- a car that moves across the screen
- a llama with ears taht grow
๐ป
Explore using the additional functions available to the animation transformations in
SuperTurtle
. Experiment with:
debug = True
?last_frame
cycles
restore_state_when_finished()
inmovement
dashes
,dots
, andrainbow
instroke
- the available
easing
options