Category Archives: 9 Word Processing

Loop proc

PImage img;

void setup() {
size(600,600);
img = loadImage(“Sequential.jpg”);
}

void draw() {
loadPixels();

img.loadPixels();
for (int y = 0; y < height; y++ ) {
for (int x = 0; x < width; x++ ) {
int loc = x + y*width;

float r = red(img.pixels [loc]);
float g = green(img.pixels[loc]);
float b = blue(img.pixels[loc]);

pixels[loc] = color(r,g,b);
}
}

updatePixels();
}


Diaphanous Proc

PImage img;

void setup() {
size(600,600);
img = loadImage(“Diaphanous.jpg”);
}

void draw() {
loadPixels();

img.loadPixels();
for (int y = 0; y < height; y++ ) {
for (int x = 0; x < width; x++ ) {
int loc = x + y*width;

float r = red(img.pixels [loc]);
float g = green(img.pixels[loc]);
float b = blue(img.pixels[loc]);

pixels[loc] = color(r,g,b);
}
}

updatePixels();
}


Condition proc

PImage img;

void setup() {
size(600,600);
img = loadImage(“Condition.jpg”);
}

void draw() {
loadPixels();

img.loadPixels();
for (int y = 0; y < height; y++ ) {
for (int x = 0; x < width; x++ ) {
int loc = x + y*width;

float r = red(img.pixels [loc]);
float g = green(img.pixels[loc]);
float b = blue(img.pixels[loc]);

pixels[loc] = color(r,g,b);
}
}

updatePixels();
}


Utopia Proc

PImage img;

void setup() {
size(600,600);
img = loadImage(“Utopia.jpg”);
}

void draw() {
loadPixels();

img.loadPixels();
for (int y = 0; y < height; y++ ) {
for (int x = 0; x < width; x++ ) {
int loc = x + y*width;

float r = red(img.pixels [loc]);
float g = green(img.pixels[loc]);
float b = blue(img.pixels[loc]);

pixels[loc] = color(r,g,b);
}
}

updatePixels();
}


Ephemeral

void setup() {
size(600,600);
smooth();
}

void draw() {
background(0);

drawEllipse(90,90);
drawEllipse(95,95);
drawEllipse(100,100);
drawEllipse(105,105);
drawEllipse(110,110);
drawEllipse(115,115);
drawEllipse(120,120);
drawEllipse(125,125);
drawEllipse(130,130);
drawEllipse(135,135);
drawEllipse(140,140);
drawEllipse(145,145);
drawEllipse(150,150);
drawEllipse(155,155);
drawEllipse(160,160);
drawEllipse(165,165);
drawEllipse(170,170);
drawEllipse(180,180);
drawEllipse(190,190);
drawEllipse(200,200);
drawEllipse(210,210);
drawEllipse(220,220);
drawEllipse(230,230);
drawEllipse(240,240);
drawEllipse(250,250);
drawEllipse(260,260);
drawEllipse(270,270);
drawEllipse(280,280);
drawEllipse(290,290);
drawEllipse(300,300);
drawEllipse(310,310);
drawEllipse(320,320);
drawEllipse(5,320);
drawEllipse(20,120);
drawEllipse(200,250);
drawEllipse(375,375);
drawEllipse(326,400);
drawEllipse(342,426);
drawEllipse(354,465);
drawEllipse(352,378);
drawEllipse(456,478);
drawEllipse(480,452);
}

void drawEllipse(float x, float y){
ellipse(x,y,50,50);
}


Serendipity

PImage img;

void setup() {
size(700,400);
img = loadImage(“Serendipity.jpg”);
}

void draw() {
loadPixels();

img.loadPixels();
for (int y = 0; y < height; y++ ) {
for (int x = 0; x < width; x++ ) {
int loc = x + y*width;
float r = red(img.pixels [loc]);
float g = green(img.pixels[loc]);
float b = blue(img.pixels[loc]);

pixels[loc] = color(r,g,b);
}
}

updatePixels();
}


Sequential

Coding>>

void setup() {
size(600,600);
smooth();
}

void draw() {
background(0);

drawEllipse(200,200);
drawEllipse(200,400);
drawEllipse(400,200);
drawEllipse(200,600);
drawEllipse(600,200);
drawEllipse(600,600);
drawEllipse(400,400);
drawEllipse(400,800);
drawEllipse(100,100);
drawEllipse(0,0);
drawEllipse(300,300);
drawEllipse(500,500);

}

void drawEllipse(float x, float y){
ellipse(x,y,100,100);
}