Skip to content

Homework John Henry 05

John Henry Thompson edited this page Oct 17, 2024 · 19 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:


Week 5 • Oct 3 • Organization with Functions

Examples:

In class:

  • For-loop review

  • Introduction to arrays

  • Defining and Using Functions

  • functions remix

Assignment due the night before our next class:


Week 6 • Oct 10 • More Repetition with Classes

In class:

  • hover over algorithm

  • animation cycle using step and delta

  • Object-Oriented Programming -- a revolution

  • Week 6 Syllabus Resources

Assignment due the night before our next class:

  • PRACTICE • Week 6 Worksheet

  • CREATE • Arrays and objects allow you to do something new with your programs: keep track of user action over the course of your sketch's execution. Create a sketch that takes advantage of your new skills. The sketch should allow the user to use clicks, key presses, etc. to add new elements to the scene (and potentially to remove them later). Your sketch should use an array of objects.

    • You will have two weeks to work on this creative assignment. For next week prepare a plan for what you hope to accomplish and be prepared to show work in progress.

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

    • Submit your assignment on our homework form.

  • WATCH •

--

Week 7 • Oct 17 • The DOM

In class:

  • The DOM

Examples

Assignment due the night before our next class:

  • PRACTICE • Complete previous worksheets

  • CREATE • Complete your array of objects two week assignment.

  • Optional: EXPLORE-CREATE • Add DOM elements (eg. sliders, buttons) to your sketch. The DOM elements should control some key aspect of the sketch. See if you can learn something new about your sketch thru interactive controls.

  • WATCH • Videos: Images/Video 11.1-11.8 - Focus on videos 11.1 and 11.3

Preview of Media Weeks

Clone this wiki locally