Skip to content

Homework John Henry 02

John Henry Thompson edited this page Oct 30, 2023 · 47 revisions

ICM Section 02 • Meeting Monday 3:20PM - 5:50PM EST in Room 409

Contents

Contacting John Henry

Homework Form

Submit all assignments using our homework form

All assignments are due the night before class

Sketches from class

Sketches from class

Week 1 • Sept 11 • 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

Components of a Web Page

Comparing Java | p5js | plain JavaScript

  • Layers of Abstraction

processing Java - storeinput

p5js JavaScript - storinginput

plain JavaScript - Canvas API

Assignment due the night before our next class:


Week 2 • Sept 18 • Animation with Variables

In class:

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

Review Example:

  • 1.2 draw_shapes_ui

    • Order of operations.
    • Coordinates and Color.
    • why are Shapes sometimes green?
  • TRY: add create_ui and update_ui to your sketch to report coordinates and colors

  • TIP: use console.log to reveal order in you code and values of variables

  • a few words on notation and meaning

    • constrast syntax and order of operations in scratch.mit.edu
  • Move Right

  • Swirly Pen Mouse Select

Video Examples:

Colors and Images

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 night before our next class:


Week 3 • Sept 25 • Interaction with Conditionals

Additional p5js Resources

Remix class activity

Assignment due the night before our next class:


Week 4 • Oct 2 • 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

Remix in class

Assignment due the night before our next class:


Week 5 • Oct 10 • 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 16 • 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 23 • 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