Drawing with Code is intended to expose participants to how to be creative with code. There are a bunch of fun examples to play with! There is everything from moving a puppet around with your face to drawings that dance around when you scream at them.
Credits:
- crazy waves is by Casey Reas, Chandler McWilliams, and LUST
- the flocking example is based on this code by Daniel Shiffman
- the face puppet example is based on this code by Dan Wilcox
You can download all these examples by going to "github.com/CMP-Studio/Hour_Of_Code_Curriculum/" and pressing the "Download Zip" button on the right on this web page. You will also need Processing, which you can download at processing.org/download/.
If you are just learning how to program, I strongly recommend checking out Scratch!scratch.mit.edu
Coding Challenges
Getting Started
-
What is your favorite color? "tweak" the colors in crazy waves (01_Positions/crazyWaves) till it's your favorite color.
-
Tweak the variables in crazy waves (01_Positions/crazyWaves) till you like the way it look, save a picture, and print it out!
-
Do the same for the smiley example (01_Positions/smiley).
-
Break something in the smiley example and try to figure out why!
-
Look a the tree grow example (03_Science/treeGrow). Try whistling at it and see what happens. Try changing the color of the tree using tweak mode.
-
"Comment" and "uncomment" something in the code. What does it change?
Going Deeper
-
What is the smiley example (01_Positions/smiley) missing? Freckles? Ears? ... Use simple shapes from the [processing reference] (https://processing.org/reference/) to add a new feature.
-
Look at the smileyGenerator example (02_Randomness/smileyGenerator). Try changing it so it only produces smilies with various shades of red faces.
-
Explore the birds example (03_Science/birds). Try tweeking the behavior and the color of the flock.