Wednesday, September 2, 2009
Monday, May 12, 2008
Friday, May 9, 2008
Monday, May 5, 2008
A Basic Scroll Example
Hack this. But cut and paste first to figure out what is what...note, the pmouseX and the pmouseY. You have some examples from earlier to help you out with this. Dig them up....
///Code is as follows:
float x = 0;
float y = 0;
void setup(){
size(400, 400);
noStroke();
}
void draw(){
background(0);
beginShape();
vertex(20 + x, 20 + y);
vertex(40 + x, 20 + y);
vertex(40 + x, 40 + y);
vertex(60 + x, 40 + y);
vertex(60 + x, 60 + y);
vertex(20 + x, 60 + y);
endShape(CLOSE);
}
void mouseDragged()
{
x +=(mouseX-pmouseX);
y +=(mouseY-pmouseY);
}
///Code is as follows:
float x = 0;
float y = 0;
void setup(){
size(400, 400);
noStroke();
}
void draw(){
background(0);
beginShape();
vertex(20 + x, 20 + y);
vertex(40 + x, 20 + y);
vertex(40 + x, 40 + y);
vertex(60 + x, 40 + y);
vertex(60 + x, 60 + y);
vertex(20 + x, 60 + y);
endShape(CLOSE);
}
void mouseDragged()
{
x +=(mouseX-pmouseX);
y +=(mouseY-pmouseY);
}
Wednesday, April 2, 2008
Wednesday, March 12, 2008
Tall Ships....
remember to root around on the processing website, and reference files for information. experimenting is part of this, as are happy accidents! Having some cool looking errors to show, in addition to your finish code, is stellar to see. Remember, you learn more from mistakes and taking risks, than answering the questions straight.
comment out your code!!!!
alpha channels and images: http://processing.org/reference/tint_.html
don't forget to check out the code that i put up from the Greenberg reading on the reserves!!!
comment out your code!!!!
alpha channels and images: http://processing.org/reference/tint_.html
don't forget to check out the code that i put up from the Greenberg reading on the reserves!!!
Subscribe to:
Posts (Atom)