Monday, October 25, 2010

Nebulaic

Assignment for Monday 10/25

Edit: Version 2 - modified it so it copies a larger area of the srcimg, and lowered the frame rate so that the number of squares created reflects the seconds.
NEBULAIC REDUX VER.2

NEBULAIC

Saturday, October 23, 2010

Clock

This was a test for the project on Monday...a kind of self imposed challenge to see if I could make an analog clock that records time accurately. Link below to the applet.

CLOCK

Wednesday, October 20, 2010

String Exercise

Exercise working with strings. Random letters are generated that follow the mouse position. If one of those letters generated happen to be the letters of my name, that letter is red and size is increased and my full name is printed somewhere randomly on the stage. Holding down LMB will turn the letters random colors, and a single click of RMB will clear the stage. Link below.

BRETT



Tuesday, October 19, 2010

Key Press Exercise

Move the black ball across the stage with the arrow keys. The stroke of the ball and the background rectangle change according to the ball's x and y position. Link Below.


KEY PRESS

Wednesday, October 13, 2010

Mapping Exercise 10/13

The 4 strokes created are mirrored around each other and the color changes in accordance to the distance of the  lines from the center of the stage. Click LMB to clear the stage. Link below.

MAPPING


    
 

Animated pattern Exercise

void setup(){
  size(800,800);
  smooth();
  background(0);
  for(int x = 10; x <= width/2; x *= 1.25){
    for(int y = 10; y <= height/2; y *= 1.25){
      stroke(255);
      fill(255,0,0,5);
      ellipseMode(RADIUS);
      ellipse( width/2, height/2, x, y);
      noStroke();
      noFill();
    }
  }


}
void draw(){
 
 
  for(int a = 0;a <=width; a +=50){
    for(int b =0; b<=height; b+=50){
     stroke(mouseX,mouseY,mouseX-mouseY,5);

  line(mouseX,mouseY,a,b);
    }
  }
}

I fixed the problem I was having with the infinite draw function and managed to add some animation to it.

Sunday, October 10, 2010





void setup(){
  size(800,800);
  smooth();
  background(0);



  for(float x = 10; x <= width; x *= 1.25){
    for(float y = 10;y <= height;y *= 1.25){
        fill(255,0,255,5);
      stroke(255);
      ellipseMode(RADIUS);
      ellipse( width/2, height/2,x,y);
    }
  }
}

Starburst - Repetition of pattern Exercise

Sunday, October 3, 2010

The code in this exercise acts heavily on the mouseX, mouseY, and pmouseX, pmouseY
data. Depending on the difference between the current mouse position and previous mouse
position, Processing draws ellipses the sizes of which correspond to that difference.
At the same time, bezier curves are beign drawn with an origin at the mouse cursor and having random
control point values. By holding down the LMB, these bexier curves are drawn as straight lines.
The RGB values of the ellipses, beziers, and lines all change depending on the current mouse position
on the stage. Link Below.

LIGHT


LMB not pressed.

LMB pressed.

Light Painting Automata - 10/3

/*The code in this exercise acts heavily on the mouseX, mouseY, and pmouseX, pmouseY
data. Depending on the difference between the current mouse position and previous mouse
position, Processing draws ellipses the sizes of which correspond to that difference.
At the same time, bezier curves are beign drawn with an origin at the mouse cursor and having random
control point values. By holding down the LMB, these bexier curves are drawn as straight lines.
The RGB values of the ellipses, beziers, and lines all change depending on the current mouse position
on the stage.*/

void setup(){
  size(600,600);
 smooth();
 background(0);

}
void draw(){
fill( 0,0,0,5);
  rectMode(CORNER);
  rect(0,0,width,height);
  noFill();
  noStroke();
  stroke(pmouseY,pmouseX,pmouseX-pmouseY);
  if (mousePressed){
    line(mouseX,mouseY,random(width),random(height));
    fill(mouseY,mouseX,mouseX,255);
  }else{
    bezier(mouseX,mouseY,random(width),random(height),random(width),random(height),random(width),random(height));
    fill(mouseX,mouseY,mouseX-mouseY,255);
  }
    ellipse(mouseX,mouseY,mouseX-pmouseX,mouseY-pmouseY);
}

Light Painting Automata - 10/3