Skip to content
sparkles555 edited this page Nov 21, 2022 · 164 revisions

Week 7

RESOURCES FROM CLASS

TEST YOURSELF

ASK

  • Can we input parameters into the call-back function? e.g. Draw(i) with i as input

Questions (example questions)

READ / WATCH


Week 6

Week 5

Homework Links


Week 4

  • RESOURCES FROM CLASS:

  • TEST YOURSELF: Complete Worksheet 4

  • DO: Our ability to see patterns is what makes us human. However we also see patterns where none exist because our brains are biased towards detecting certain kinds of patterns over others (e.g. faces). Create a pattern by making something with a lot of repetition, more than you want to hand-code. Is the resulting pattern easy to see or hard to see? What would it mean to create the illusion of pattern? Can you predict what the pattern will be when you run your code or does it surprise you? You could take something you've already done where there was a lot of repetition in the code (e.g. your self-portrait) 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? Try creating an algorithmic design with simple parameters. (One example is 10PRINT, example code).

  • READ / WATCH

    • Videos 5.1-5.3(~40min) in the learning p5.js series.
    • Getting Started with p5.js chapters 9-10
  • RUN CODE

  • ASK

    • Post at least 1 question here. Need help on asking a question?
    • Name (optional): Question
    • Peter: How do I make mouseClicked choose a different color from a set of 5 colors every time I click?
    • Xiaoran: How can I record the progress of nest loop into animation?

Homework Links


Week 3

  • RESOURCES FROM CLASS:

  • TEST YOURSELF: Complete Worksheet 3

  • DO: Use conditional statements to control the flow of your programs. Create a sketch that asks you to make difficult choices that have either small, medium or large 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.
  • READ / WATCH

  • ASK

Homework Links: 1 Sketch Per Pair


Week 2

  • RESOURCES FROM CLASS:

  • TEST YOURSELF: Worksheet Post a url to your answers on the Google Doc.

  • DO:

    • No man is an island. There is no such thing as a new idea.Everything is related to everything else. It’s all relative.
    • The world is defined through relationships and those relationships shape our perspectives. Use variables to build in some relationships between two or more elements in your sketch and think about how the perception of what’s happening is different depending on which element's perspective you take on. Think about:
      • What’s related to what?
      • How are they related?
    • You should definitely take a mathematical approach to answering these questions but you can also take a figurative, metaphorical approach.
    • The elements common to all of your sketches are: position, dimensions, stroke thickness, color values. Can you relate one or more of these elements to:
      • itself over time (so it changes over time)
      • a different element in your sketch
      • frameCount (which frame of animation is now)
      • mouseX or mouseY or the combined (mouseX, mouseY) mouse position
      • or something else!
    • You can revisit your self-portrait to build relationships (link the eyeballs together!) or create something new.
  • WATCH, READ, RUN CODE:

    • Watch Conditionals 3.1 - 3.4 ~1hr | Get Code
    • Getting Started with p5: Chapter 5 (Response). | Get Code
    • Go further with Transformations (Optional)
      • Video Tutorials 9.1-9.3
      • Getting Started with p5: Chapters 6 (Transformations) and 8.10-8.15 (More complex motion)
  • ASK

    • Post at least 1 question below. Examples of good questions...
    • How to use conditionals to see if my mouse is off canvas?
    • How to change the refresh rate of draw()?
    • How to fix the quivering circle that follows my cursor...? (question by vesper and here is the p5js link)
    • Do lines such as noStroke() apply to only the first shape underneath it or all shapes written underneath it?
    • Is it possible to slow down the circles (using random();)?
    • The speed at which the circle moves closer to the mouse position is not constant in the worksheet. How to set the same speed?

Homework Links

  • Boaty McBoatface -- [blog post](url to blog), [zoog]

Week 1

  • RESOURCES FROM CLASS:

  • SET UP:

  • DO:

    • Complete this worksheet. Our weekly worksheet become the basis for the next class. You must be logged in with your NYU account to access the worksheet.
    • Create a "self" portrait using 2D primitive shapes – arc(), curve(), ellipse(), line(), point(), quad(), rect(), triangle() – and basic color functions – background(), colorMode(), fill(), noFill(), noStroke(), stroke(). Remember to use createCanvas() to specify the dimensions of your window and wrap all of your code inside a setup() function. Here's an example: Zoog
    • Write a blog post about 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? (You can review and contribute to the ICM Inspiration Wiki page). In the same post (or a new one), document the process of creating your sketch. What pitfalls did you run into? What could you not figure out how to do? How was the experience of using the web editor? Did you post any issues to github?
  • READ AND WATCH:

  • ASK

    • Post at least 1 question below. Examples of good questions...
    • Name (optional) -- Question: Why is it that this is like this and that is like that?
    • In what situations do you initialize a variable as you are declaring it, i.e., let circleX = 0; function setup() {?
    • How to see my curser's real-time coordinates on my canvas?

Add Your Homework