Welcome to my Web Portfolio Blog Page

In my blog you will find
my creative ideas, life experiences, articles, projects, coding, photos, videos, links
and much more.

(click here to return to www.rachelwalker.net)

Sunday, April 20, 2008

Processing #4 post

This has a hot pink background and 2 stationary squares, one blue square in the upper left corner, and a slightly smaller black square, overlapping the blue square.
void setup() {
size(400, 400);
background(197,22,187);
}
void draw() {
background(197,22,187);
float m = millis();
fill(m % 194,46,182);
rect(mouseX, mouseY, 50, 50);
float n = millis();
fill(n % 238,231,41);
rect(30, 30, mouseX, mouseY);
float o = millis();
fill(o % 0);
rect(30, 30, 30, 30);
PFont fontA = loadFont("Ziggurat-HTF-Black-32.vlw");
textFont(fontA, 30);
int x = second();
fill(187,193,236);
text("Dawn", x, 60);
fill(230,203,25);
text("Morning", x, 95);
fill(244,113,8);
text("Afternoon", x, 130);
fill(112,19,228);
text("Dusk", x, 165);
fill(4,16,110);
text("Evening", x, 200);}
----------------------------------------------
This is a small white rectangle with a thin black stroke in the center of the page.
void setup() {
String bodyCountText[] = loadStrings("http://www.iraqbodycount.org/counters/min.txt");
println(bodyCountText[0]);
int s=int(bodyCountText[0]);
s=s / 10000 ;
println(s) ;
rect(20,20,40,s);
//the 20,20 are integers}
void draw() {}
----------------------------------------
ELSE STATEMENTS
This is just an example of a if /else statement:

void draw(){
if (second() <30){
println("hi");
}else{
println("bye");}}
//instead of printline you will us text and fill..etc
-----------------------------------

No comments: