Skip to content

Homework John Henry 05

John Henry Thompson edited this page Sep 26, 2024 · 14 revisions

ICM Section 05 • Thursdays 12:10PM - 2:40PM EST in Room 407

Support

Homework Form

Submit all assignments using our homework form

All assignments are due the night before class

Sketches from class

My Sketches from class

Week 1 • Sept 5 • Introduction and Drawing in p5.js

In class:

  • Welcome! and introductions
  • Course overview
  • What is p5?
  • p5 web editor
  • p5 functions
  • Tips for learning to code
  • Syllabus / schedule
  • What can we do with creative coding?

Resources

Assignment due the night before our next class:


Week 2 • Sept 12 • Animation with Variables

In class:

  • Homework review and Questions
  • Logging values to the Console
  • Introduction to variables
  • Animating shapes
  • p5's system variables

Video Examples:

Variables and Expressions

  • circleX modulo Expressions

  • circleX buttons Buttons to change variables

  • circleX follow An algorithm to follow the mouse

  • 2.2.3 circleX width ui

  • reporting variable values, cooridinates and colors

  • TRY: adding specific colors using Color Meter.app

  • remix to demonstrate

    • global variables
    • local variables
    • expressions
    • defining your own function
    • object literals
    • parameter variables

Functions + object literals

Grouping variables into object literals and passing to functions as parameter variables.

Animation using computation

Assignment due the 24-hours before our next class:


Week 3 • Sept 19 • Interaction with Conditionals

Additional p5js Resources

Remix class activity

Assignment due the 24-hours before our next class:

  • PRACTICE • Week 3 Worksheet

  • CREATE • Assignment #3

    • Two roads diverged in a yellow wood, And sorry I could not travel both... Life is full of difficult choices, use conditional statements to control the flow of your programs. Create a sketch that asks people to make difficult choices that have surprising consequences.

    • Which choices are easier, harder? Which choices are false choices?

    • What internal or external factors influence the choice? How do others’ choices affect your choices?

    • What choices surprise you with unexpected outcomes?

    • Can you combine choices to create hard-to-predict results? (Hint: Use && and ||)

    • Work in Pairs Can you divide an idea into two parts and combine those parts? (e.g. One of you codes the input behaviors (if statement) and the other one codes the output behaviors (what to do if it’s true.) Can you swap sketches and riff off of your partner's work? Provide 1 sketch link per pair, however clearly describe who did what in the code.

    • Be sure to cite the source of any material / code you use.

    • Submit your assignment on our homework form.

  • WATCH, READ, RUN CODE:


Week 4 • Sept 26 • Repetition with Loops

In class:

  • Review worksheet
  • Share our homework
  • Review conditional statements
  • Introduction to loops
  • Preview of functions

Examples :

What could the code look like?

Patterns with Loops

Assignment due the night before our next class: