Skip to content

Homework Mimi Wednesday

openthy edited this page Nov 19, 2014 · 179 revisions

Guidelines

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!

  1. Do your assignment.
  2. Contribute a question.
  3. Post documentation. Something visual + your code. e.g. Blog post with code, screenshots, video, or a web version of your sketch.
  4. Place a copy of your sketch folder in our class' shared dropbox folder. (Look for it in email.)

Week 11:

Add Your Homework

Week 10:

  • REVIEW:
  • DO
    • Come with working code to test on your classmates! They can be several small sketches to try out different interactions, different colors, different images. It doesn't need to be a complete experience!

ASK QUESTIONS: Contribute questions below. (Name optional.)

  • Your Question Here

Week 9

ASK QUESTIONS: Contribute questions below. (Name optional.)

  • Your Question Here

Add Your Homework

Week 8

ASK QUESTIONS: Contribute questions below. (Name optional.)

  • Your Question Here
  • Teresa - What is the difference between having two variables pointing to the same image file, and duplicating an image to edit the pixels? Does creating separate variables for the same image allow you to change it in different ways? Does that become two instances of the same object?

Week 7

ASK QUESTIONS: Contribute questions below. (Name optional.)

  • Your Question Here

Questions

  • Your Question
  • Luke -I keep encountering error like bellowed during I doing a static image animation when I load some image into the background or make the animation appear under a certain y value: "javax.media.opengl.GLException: Caught NullPointerException: null on thread AWT-EventQueue-0" what happened?
  • Oryan - Is there a way to change play with the background (e.g. to erase graphics) when using a video?
  • Teresa - What is the difference between having two variables pointing to the same image file, and duplicating an image to edit the pixels? Does creating separate variables for the same image allow you to change it in different ways? Does that become two instances of the same object?

Week 6

ASK QUESTIONS: Contribute questions below. (Name optional.)

Questions

  • Your Question
  • Oryan- How do u make an array or arrayList from sensors?
  • Luke - How to use PVector?(what is mag() and heading()?)
  • In Young - How do I place image without background? How do I use popMatrix?
  • Zhen - How to zoom(scale) all the things at the same time/the canvas?
  • Zhen - How to give a ball a tail, and when the ball turns, the tail turns smoothly/in a good look? -^-
  • Zhen, again - How to change the moving speed of the balls base on the frequency of keypressed/mouseclicked?@^@

Add Your Homework

  • Your Name -- Link Here.
  • Changyeon --
  • In Young --
  • Luke --
  • Oryan --
  • Sergio --
  • Teresa --
  • Tigran
  • Shiloh --
  • Yifan --
  • Zhen --

Week 5

  • DO

    • Define a class. Turn an element of one of your old sketches into a class. Make sure it works.
    • Send ONLY the class definition to your partner.
    • Incorporate your partner's class into a new sketch.
    • Bonus: Figure out a way to have your objects communicate each other. (Something like: If ball1.isCloseTo(ball2.x, ball2.y), change the background, where boolean isCloseTo(floatx, float y) is a function defined in your Ball class.)
  • READ, WATCH, RUN

ASK QUESTIONS: Contribute questions below. (Name optional.)

Questions

  • Tigran: How do we do object communication?
  • Oryan: How do you decide whether logic goes outside or inside the class?
  • Zhen: How do we isolate color values?
  • Sergio: Can you use existing Procession functions (e.g. void mousePressed())
  • Yifan: I want color to change more fluidly.
  • In Young: How to combine 2 classes: 1 needs bg, the other can't have bg
  • Changyeon: I want sketch to remember something it's not remembering.
  • Teresa: What is the relationship between objects and classes.
  • Luke: How do I remove things from arrays? How can I erase an array? And then create a new one?

Add Your Homework

  • Your Name -- Link Here.
  • Changyeon --
  • In Young --
  • Luke --
  • Oryan --
  • Sergio --
  • Teresa --
  • Tigran
  • Shiloh --
  • Yifan --
  • Zhen --

Week 4

  • DO:

    • Re-organize your code into functions.
    • Try to make your functions take parameters so you can re-use them in a different sketch.
  • REVIEW

  • READ, WATCH, RUN

  • ASK QUESTIONS: Contribute at least 1 question below. (Name optional.)

Questions | Examples

  • Name: Question
  • Oryan: how to define "special" arguments like rounded corners?
  • Oryan: How to decide what needs to be its "own entity" and needs to have its own function? e.g. anything that moves on its own?
  • how to make multiple object at a time other than copy and paste, "Array??"
  • Teresa: When would you need a function within a function?

Add Your Homework

Week 3

  • DO: Divide this week’s assignment into 2 parts:

    • (1) Create many things on the screen with a for-loop.
    • (2) Create 2 different types of mouse interactions with if/else statements: e.g. Switch Button | Fire Button | Hold Button | Rollover
    • (3) Mid-week, swap your sketches and incorporate the other person’s sketch into your own.
  • REVIEW

  • READ, WATCH, RUN

  • ASK QUESTIONS: Contribute at least 1 question below. (Name optional.)

Questions | Examples

  • Name: Question
  • Sergio: How can i give a random color value to the objects inside a for loop (different color to each one of them) but only when the sketch starts?
  • Oryan: Is there a way to "stop" a for-loop without conditioning (if,else)?
  • Sergio: When should we use mouse interactions as "if" statements and when as Functions? e.g. "if (mousePressed);" vs "void mousePressed();"
  • Oryan: Is there an else expression to a while/for loop? eg: x > endX BUT not larger then x1.
  • Teresa: How do I make loops stop?
  • Luke: How can I slow down the frame?

Add Your Homework

Week 2

  • DO

    • Create a animated application that moves and changes over time.
    • Make it interactive with mouseX and mouseY. Try dist().
    • Play with random()
  • READ & WATCH

  • ASK QUESTIONS: Contribute at least 1 question below. (Name optional.)

Questions | Examples

  • Name: Question
  • Oryan: Since random allows use of one parameter and color has three (RGB), is there a way to random colors in one row of code?
  • Teresa: Is there a way to draw a random thing once and then stop?
  • Luke : How to make a variable that shows your "prior" mouseX?
  • Teresa: In Example 5-2, green does not increase for mousePressed, but the book says it does. Is it broken?
  • Oryan: When using rotate (pushMatrix) and random, all objects need to be on the same matrix system? didnt work otherwise.
  • Oryan: How to define an object as location points which will allow using it for mouse gestures?
  • Catherine: I wanted to create a gradient which changed for a relationship y=constant * x. Struggled with that as I wanted everything to change according to this basic relationship.

Add Your Homework

Week 1

Questions | Examples

  • how can I make the line I draw appear on the screen one by one instead of all at once? (Luke)

  • Is it possible (or maybe totally unnecessary) to have a pixel location grid overlay so that pixel locations are more concrete/guessable? (Catherine)

  • How to draw a curve I want? (Zhen)

  • Is it possible to rotate shapes around a center point, or any other specific point? (Sergio)

  • Is there a way to have ALL distances proportionally to the sheet AFTER the sketch is done? If not what is the right method of doing it? (Oryan)

  • What's the right way to post .edp/.js on the internet? (Oryan)

  • Same as Zhen, How to draw the curve? (Yang)

  • How can I draw polygons with more than 4 sides?(Teresa)

  • How does rotation work? Where is the axis, and how can I better control the rotation?(Teresa)

  • Is there a simple way to make and edit an evenly spaced grid?(Teresa)

  • How to figure out the right way to rotate? (Tigran)

  • How to achieve gradients? (Tigran)

  • How do I offset shapes?

Add Your Homework


Processing on the Web - Javascript

  • JavaScript mode in Processing is a nice magic trick that allows you to run a Processing sketch in a web browser. However, there are lots of reasons why it may not work from obvious ones like no third party libraries to less obvious ones like no functions with the same name as a variable. To make matters worse, some of Processing's 2.0 API is not implemented for JS. Use JavaScript mode cautiously and don't let it get in the way of the important stuff like just making what you want to make. Instructions for JavaScript Mode
  • Just to make things even more confusing, we are also teaching something at ITP called p5.js. If you take Commlab: Network Media, you'll encounter this. p5.js is a JavaScript library that starts with the original goal of Processing, to make coding accessible for artists, designers, educators, and beginners, and reinterprets this for today’s web. p5.js is a framework you want to use if you want to write your code natively in JS whereas processing.js is something that will translate your code behind the scenes for you.