-
Notifications
You must be signed in to change notification settings - Fork 2
Homework Ellen
Welcome to ICM Section 7's Wiki Page!
- Contacting Ellen
- Guidelines
- Submitting Homework Assignments
- Support
- Week 1 Introduction and Drawing
- Week 2 Animation: Variables
- Week 3 Interaction: Conditionals
- Week 4 Repetition: Loops
- Week 5 Organization: Functions ...and Introducing Arrays and Objects
- Week 6 More Repetition: Generating Multiple Objects with Classes, Arrays, and Loops
- Week 7 The DOM
- My office hours are Wednesdays 8PM-10PM ET and Fridays 8AM-10AM ET. Here is my calendar to sign up.
- My email is [email protected].
- You can also connect with me on the ITP/IMA Discord @Ellen (she/her).
A big part of learning at ITP is learning from each other. So share your work and in exchange you'll get to see everyone else's!
- Do the assignment each week.
- Share your documentation. For ITP students this is usually, but not always, in the form of a blog post. Ideally include something visual (inspirational images, screenshots, videos of the interaction), some written thoughts, and code. If you are struggling with your sketch, put your energy into writing about what didn't work and how you tried to solve it. It's okay to vent your frustrations! Writing a blog post helps you remember what you did and tried to do. Think of it as telling yourself a story or writing a reference guide for your future self so that you don't have to relearn everything from scratch.
Assignments are due the day before class each week. I will not give credit for assignments that are turned in late. Keeping in mind that I want you to succeed, and that the material can sometimes be challenging, I absolutely prefer tentative work to work that is turned in late.
There are worksheets (linked below) to practice the concepts introduced in this course. You are expected to add links to your p5 sketches directly in these documents. Log in to your NYU account to access them.
To submit all other assignments (i.e. your blog posts or other documentation), use this homework form.
Here is the spreadsheet with everyone's responses.
If you find yourself struggling, there are many forms of support at ITP:
- Look out for the residents' office hours and help sessions.
- Visit The Coding Lab, a walk-up (and virtual) help desk for NYU students to get help with their code from ITP student mentors.
- Post a question in the ITP Discourse in the icm category, tagged with our section icm007. Think of Discourse as an asynchronous Q&A forum for peer support for solving technical issues and trouble-shooting, as well as for archiving discussions long-term. As more questions accumulate over time, it will become a useful technical support resource for everyone. Feel free to answer other students' questions, too!
- Post a question in the ITP/IMA Discord HELP-ITP #icm channel. Think of Discord as chat. Itβs a platform designed for synchronous connections and community messaging. If you need a question answered in real-time, consider posting here to chat with another student or resident who is currently online.
- Need help asking a question?
Meeting Wednesday, September 9 @ 8:00PM - 10:30PM ET
- Create a GitHub account. You might need it to contribute to the ICM syllabus wiki pages.
- Log in to a p5.js web editor account with your GitHub account.
- Join the ITP Discourse. I will email everyone an invite link.
- Before the assignment, watch Videos 1.1 - 1.6 (~1 hour 15 min).
- If you prefer reading, Allison Parrish's excellent First steps with p5.js tutorial covers the same topics.
- Chapters 1-3 of Getting Started with p5.js (read for free) also covers the concepts. Note: It was written several years ago so some aspects--but not the general ideas--might be out of date.
- After the assignment, watch Videos 2.1 - 2.3 (~30 min) for the next class.
- Code examples:
- The Coding Train Originals | 2020 Updates
- Getting Started with p5.js Originals | 2020 Updates
- Test yourself: complete Worksheet 1 (NYU login required).
- Create your own p5 screen drawing: a self-portrait, alien, cyborg, etc.
- Use 2D primitive shapes:
arc()
,curve()
,ellipse()
,line()
,point()
,quad()
,rect()
,triangle()
- Also use basic color functions:
background()
,colorMode()
,fill()
,noFill()
,noStroke()
,stroke()
. - Remember to use
createCanvas()
to specify the dimensions of your canvas, and wrap all of your code inside asetup()
function.
- Use 2D primitive shapes:
- Write a blog post, and submit it using the homework form.
- Include a link to your p5 screen drawing. Document the process of creating your sketch. What challenges did you encounter? What could you not figure out how to do?
- In the same post, describe how computation applies to your interests. This could be a subject you've studied, a job you've worked, a personal hobby, or a cause you care about. What projects do you imagine making this term? What projects do you love? Feel free to review and contribute to the ICM Inspiration Wiki page.
Meeting Monday, September 14 @ 8:00PM - 10:30PM ET
- Week 2 Curriculum Outline
- Our Miro Board
- p5 Demo Sketches:
- For the assignment:
- Videos map() 2.4 and random() 2.5 (~20 min)
- For review plus some extra tips:
- Allison Parrish's tutorial, see Expressions and Variables (the section on Repetition with Variation previews Loops)
- Getting Started with p5.js: Chapter 4: Variables, examples 4-1 to 4-4, and Robot 2 at the end of the chapter & Chapter 5 Response, examples 5-1 to 5-9 (example 5-8 helps with worksheet question 6)
- For next week's topic, Conditionals: Videos 3.1 - 3.4 (~1 hr)
- Code examples: The Coding Train and Getting Started with p5.js
- (Optional) Going further with Transformations
-
Video 9.1:
translate()
,rotate()
,push()
,pop()
(~23 min) -
Video 9.2:
scale()
(~8 min) -
Video 9.3: more on
push()
,pop()
(~8 min) - Allison Parrish's tutorial on Transformations
- Getting Started with p5.js: Chapter 6 on Translate, Rotate, Scale
-
p5 sketch example illustrating
translate()
androtate()
- Carrie Wang's Spiraling Square Using Translate and Rotate: Video Tutorial and Code
-
Video 9.1:
- Test yourself: complete Worksheet 2.
- Create a sketch that includes all of these and write about it in a blog post:
- One element controlled by the mouse.
- One element that changes over time, independently of the mouse.
- One element that is different every time you run the sketch.
- For example:
- You could try refactoring your Week 1 homework by removing all the hard-coded numbers except for
createCanvas()
. Have some of the elements follow the mouse. Have some move independently. Have some move at random. - Or you could do the above but change color, alpha, and/or strokeWeight instead of position.
- Or do something completely different!
- You could try refactoring your Week 1 homework by removing all the hard-coded numbers except for
Meeting Monday, September 21 @ 8:00PM - 10:30PM ET
- Week 3 Curriculum Outline
- Our Miro Board
- Coding Train Video: The Modulo Operator with Golan Levin
- p5 Demo Sketches:
- For review and more tips:
- Interact with Allison Parrish's Interaction tutorial
- Getting Started with p5.js: Chapter 5 Response, examples 5-10 to 5-23 and Chapter 8 Motion, examples 8-3 to 8-5
- For next week's topic, Loops:
- Videos 4.1 - 4.2 (~25 min)
- If you prefer reading, Getting Started with p5.js: Chapter 4 Variables, examples 4-5 to 4-13
- Code examples: The Coding Train and Getting Started with p5.js
- Test yourself: complete Worksheet 3
-
WORK IN PAIRS: In general this week, you should work with rule-based animation, motion, and interaction. You can use the ideas below or invent your own assignment. Can you divide an idea into two parts and combine those parts? (e.g. One of you codes the input behaviors and the other one codes the output behaviors.) Can you swap sketches and riff of of your partner's work? You can complete the assignment together or break off and finish individually. Everyone should still submit their own blog post.
- Try making a rollover, button, or slider from scratch. Compare your code to the examples on github. In Week 7 we'll look at how this compares to interface elements we get for free from the browser.
- Tie the above two together and have an interface element control the visual design or behavior of other elements in your sketch.
Meeting Monday, September 28 @ 8:00PM - 10:30PM ET
- Week 4 Curriculum Outline
- Our Miro Board
- p5 Demo Sketches:
- For a review: Happy Coding Tutorial: For Loops
- For next week's topic, Functions:
- Videos 5.1 - 5.3 (~30 min)
- If you prefer reading, Getting Started with p5.js: Chapter 9 Functions
- Code examples: The Coding Train and Getting Started with p5.js
- Test yourself: complete Worksheet 4
- Make something with a lot of repetition, more than you want to hand-code.
- You could take something you've already done where there was a lot of repetition in the code and see if you can re-write it using a loop so that instead of 28 lines of code that call rect(), you have 1 line of code calls rect() inside of a loop that goes around 28 times. How do you need to rework the way you position that rect() in order to make it work in a loop?
- Or try creating an algorithmic design with simple parameters. One example is to invent your own 10PRINT design. Here are some resources: Coding Train Coding Challenge: 10PRINT and example code. Another source of inspiration: Sol Lewitt's Wall Drawings.
Meeting Monday, October 5 @ 8:00PM - 10:30PM ET
- Week 5 Curriculum Outline
- Our Miro Board
- p5 Demo Sketches:
- For review:
- For next week's topic, Generating Multiple Objects with Arrays and Loops:
- Videos 6.1-6.3 Object-oriented Programming (~30 min)
- Videos 7.2-7.7 Objects, Arrays, and Loops (~1 hr 20 min)
- (Optional) Uploading Media Files and 7.8 Objects and Images (~24 min)
- If you prefer reading, Getting Started with p5.js: Chapter 10 Objects and Chapter 11 Arrays
- Code examples: The Coding Train and Getting Started with p5.js
- Test yourself: complete Worksheet 5
- The idea this week is to explore reorganizing / refactoring your code. It is 100% legitimate to turn in a version of a previous assignment where nothing changes for the end user, but the code has been restructured. You may, however, choose to try a new experiment from scratch. Aim to keep
setup()
anddraw()
as clean as possible, and do everything (all calculations, drawing, etc.) in functions that you create yourself. Possibilities (choose one or more):- Break code out of
setup()
anddraw()
into functions. - Use a function to draw a complex design multiple times with different parameters.
- Reorganize "groups of variables" into objects (see Video 2.3 mentioned above).
- If you are feeling ambitious, try embedding a function into an object.
- Break code out of
Meeting Monday, October 12 @ 8:00PM - 10:30PM ET
- Week 6 Curriculum Outline
- Our Miro Board
- p5 Demo Sketches
- Ellen's Zoom Backgrounds
- Is your p5 sketch getting way too long? Here's how to organize your code into separate files: Video 6.4 (~5 min)
- Allison Parrish's tutorial on Browser Controls
- HTML / CSS / DOM Videos 8.1-8.10 (~2 hr). There's a lot, and if it's too much information, just focus on the basics:
- Code examples: The Coding Train
- Test yourself: complete Worksheet 6
-
Part 1: Design a sketch in an object-oriented fashion.
- You might follow these steps and see how far you get. Even just doing the first couple steps is okay!
- Make one single object with just variables.
- Put one or more functions in the object.
- Try manually making two objects.
- Duplicate the object using a for loop and an array to make as many as you like!
- If you are already working with classes / objects and arrays, re-organize your classes into the "smallest functional units" possible (e.g. make properties in your classes that are functions, also called methods).
- Try different ways to have your objects "communicate" with each other in some way.
- In the end the goal is to have code in draw() that only makes calls to objects. Something like:
- You might follow these steps and see how far you get. Even just doing the first couple steps is okay!
function draw() {
background(0);
// A single object
apple.chop();
// Another object
orange.peel();
// Calling a function on all of the objects in an array
for (var i = 0; i < grapes.length; i++) {
grapes[i].pluck();
}
}
-
Part 2: Next week you will be presenting your own assignments. Time limit is four minutes. Focus on what's happening in your sketch computationally. Write out what you're going to say and prepare any diagrams that will help you explain what's going on.
- Give yourself time to properly demo your sketch. Show us what's interesting about the interaction.
- Tell us the programming concepts are you using (e.g. objects and arrays, nested for loops, toggle logic, re-usable functions)
- De-construct for us one thing you think is interesting about how your sketch works.
Meeting Monday, October 19 @ 8:00PM - 10:30PM ET
- Week 7 Curriculum Outline
- Our Miro Board
- p5 Demo Sketches
- Best Website Ever v1 (HTML tags)
- Best Website Ever v2 (Javascript/p5)
- DOM Resources
- MDN - Introduction to the DOM
- MDN - HTML Elements Reference, a list of all possible tags
- MDN - Intro to CSS
- For general p5 review and even more practice!
- Video and Pixels, Videos 11.1 - 11.7 (Code) ~1 hr 40 min (Focus on 11.1 and 11.3)
- Test yourself: Complete these ICM Quizzes (you can skip Week 1 Question 4) and write a blog post with any questions that you have about the topics or specific problems/solutions. Is there anything that is confusing? What would would you like to spend more time learning and practicing (including beyond these weekly topics)? Here are some resources for the Week 7 DOM section:
- Beyond the Canvas, using p5 with HTML elements
- p5 DOM Reference
- p5 Element
- p5 style()
- HTML / CSS / DOM Videos 8.1-8.10
- Allison Parrish's tutorial on Browser Controls
Starting Week 8, we'll use the ICM-2020-Media Homework Ellen Wiki