Classes 2 (jiggle things)

jiggle
Source:
class2.txt
FloatyThing.txt

bene posted on March 26th, 2008   Add comment

Classes I

A simple class that defines a Person and demonstration of using member fields and methods.
class1.txt
class Person

bene posted on March 25th, 2008   Add comment

Project 1: Art in Motion

Due Tuesday, April 15th
For your next project, you will need to absorb some of NYC’s art. Your best bet is to go to MoMA, as they have the most extensive Modern art collection. Other options are the Met, Brooklyn Museum, Whitney, or Guggenheim’s Modern art galleries.

You will need to find an abstract painting that conveys a sense of motion. During the color presentation, we talked about Piet Mondrian’s Broadway Boogie Woogie, which is a good example. Take a photo of it while you’re at the museum and write down the title and artist’s name so that you can research it later.

In Processing, you will need to recreate your chosen work, in whole or in part, through procedural drawing (you may not use the PImage object). The goal is to take the implied motion, and translate it into animation.

On Tuesday, April 15th, you are to bring to class:

  1. Proof of your museum visit: a dated museum receipt or ticket/button, a surreptitious camera phone picture of yourself.
  2. Your Processing sketch, which should run correctly. No incomplete sketches, no compiler errors.
  3. Yourself, prepared to present your sketch and tell us some information about the work you chose (including title, artist, art period in which the work was done, a brief description of the artist’s style, analysis/history of the particular work). You should have a digital image of the original artwork, so that we can compare it with your work.

bene posted on March 17th, 2008   17 comments

Midterm review

Color (Color Presentation has been updated)

color bgColor;
void setup() {
  bgColor = color(255, 0, 255);
}
void draw() {
  background(bgColor);
  println("red:" + red(bgColor));
  println("green: " + green(bgColor));
  println("blue: " + blue(bgColor));
  println("hue: " + hue(bgColor));
  println("saturation: " + saturation(bgColor));
  println("brightness: " + brightness(bgColor));

  noLoop();
}

Arrays

char[] letters = new char[7];

void setup() {
  for(int i=0; i<7; i++)
    letters[i] = char(i+65);

  letters[2] = 'Z';
}

void draw() {
 for(int i = 0; i<7; i++)
  println(letters[i]); 

  noLoop();
}

Motion and Timing

int x, y;
int lineX;
int startingX;
void setup() {
  size(600, 600);
  x= -300;
  y=0;
  startingX=x;
  lineX = 0;
}

void draw() {
  if(frameCount % 5 == 0) {
    line(lineX, 0, lineX, height);
    lineX+=5;
    if (lineX > width)
      lineX = 0;
  }
  rect(x, y, 100, 100);
  x++;
  y+=2;
  if ((y > (height-100)) || (x > width)) {
    startingX+=100;
    x=startingX;
    y=0;
  }
  if (startingX > width)
    startingX = -400;
}

bene posted on March 11th, 2008   Add comment

FrankenSketch1: Line Drawing

FrankenSketch

Interactive line drawing sketch: code

Weekend assignment fix the last bug: have a circle drawn around the first point.

bene posted on February 29th, 2008   Add comment

text1: scrolling name

the pseudo-Matrix text effect: (more…)

bene posted on February 28th, 2008   Add comment

Keyboard and Mouse Input (plus assignment #3)

Assignment #3: Modify the key sketch to include the following new features:

1) DO NOT allow the circle to fall off the screen.

2) Allow the user to adjust the size of the circle by pressing [ (to decrease the size) and ] (to increase the size). Do not allow the size to exceed the edges of the screen. This means that maximum size is dependent on the circle’s position on the screen.

3) Design and implement your own idea for a new feature that is controlled by mouse input.

February 22nd in-class code:
key.txt
mouse.txt

bene posted on February 26th, 2008   Add comment

color 2: ranges of colors (plus Assignment 2)

Start from today’s code (after the link). Complete the original goal of having the “magic” bar display a complementary color to the other bars’ range of colors. See the email sent to the list for more information.

code: color2 (color2.txt)

bene posted on February 14th, 2008   Add comment

Day of Color

To run the code in Processing, you will need the MyGUI library.

In class code: (more…)

bene posted on February 12th, 2008   Add comment

Assignment 1

Combine sketch1 and sketch2 in the following way:
remove the horizontal line from sketch2, and replace it with the circle from sketch1. The circle should maintain its original characteristics (rate of motion across window, bouncing when falling off the window). The rectangles should also retain their drawing pattern.

Feel free to grab clean copies of each sketch off of the blog, sketch2 has been cleaned up and the rectangles are more neatly positioned. You may want to also clean up the bouncing, so that it actually happens when the circle “touches” the edge of the window.

bene posted on January 29th, 2008   Add comment

Next Posts Previous Posts


Pages

Categories

Links

Feeds