Blank

Trying to get the image to appear with circles rather than triangles – the base of the image is circular. I can’t get the image to appear in the window. Its just blank – and pretty, pretty, pretty…frustrating.

**I took the code from the triangle image post as a start**

PImage img;

void setup(){
size(1000,1000);
img = loadImage(“protrait.jpg”);
img.filter(POSTERIZE,10);
smooth();
}

void draw(){
background(255);
loadPixels();

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

stroke(img.pixels[loc]);
fill(img.pixels[loc]);

if(x%10==0)  elipse (y+ 10,16);
else  elipse (z+16,16);

}
}
}
void mousePressed(){
save(int(random(10))+”.jpg”);
}

Putting it all together

Code from class, circuit schematics, etc. are at the bottom

Let’s get the chocolate in the peanut butter

Continue reading

Rainbow Hadouken

First of all, I’d like to give a BIG thank you to Scott and Joe for helping me figure this out.  I was pretty stumped, despite it seeming quite simple.

For this week, I took a clip from a game called Ultimate Marvel vs. Capcom 3.  This clip includes two large beams that are (mostly) Cyan.  I decided it would be really cool to see what that clip would look like if I replaced all the Cyan pixels with random colors.  The first beam is in the normal color, but I clicked my mouse during the second beam to trigger the color change.  Results and code are below!

 

pittsburgh roads

Hi all,

I’ve been on the road this weekend trekking back and forth to Pittsburgh. Sadly I didn’t have a lot of time to make something super cool, but I made a little safety mechanism inspired by the not so stellar divers of NY, NJ, and good ol Pennsylvania.

With this, if you decide to take your eyes off the road, text, or look for your easy pass, your lovely view of pbrgh bridges will flash a red warning.

Thanks!

Pittsburgh_roads3

 

 

Triangular Portrait

Hi all,

I experimented with making a portrait by using triangles.

Here is the code:

PImage img;

void setup() {
size(300, 335);
img = loadImage(“portrait.jpg”);
img.filter(POSTERIZE, 10);
smooth();
}

void draw() {
background(255);

loadPixels();

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

stroke(img.pixels[loc]);
fill(img.pixels[loc]);

if (x %10 == 0) triangle(x-5, y, x, y+10, x+5, y);
else triangle(x-5, y+10, x, y, x+5, y+10);
}
}
}

void mousePressed() {
save(int(random(10))+”.jpg”);
}

Here is the image:

 

 

4

I also add a save function. If I press the mouse when it is running,  a image will be saved in the folder. The file name is random number from 0-10.

After doing this, I tried to modify my code to see if I could make the code to show the process of paint with triangles. And I think the “save” function will be very nice for showing the whole image development. I haven’t worked it out, but if anyone knows any reference that is close to this idea, please let me know:)

 

Sam and Anna’s Human Bubble Game

For our video manipulation we borrowed Echo’s code from her bubble game (thank you!!) and modified it to use color tracking to turn the player’s hand into the “catcher”.  We also added an “end game” function and tried to add a timer in the beginning to allow time for the color/pixel selection at the beginning of the game, but weren’t able to get the timer to work.

 

last old one

Ok here is what I did for the bouncing balls assignment a week ago.

 

bouncing balls

Self Portrait

Hey so I know this is a bit old, but here is mine. I did it abstract art style, with some nice pastels

 

self portrait

Dance Dance

dancingbox

 

What I really wanted to do was to make the box dance to a rhythm, but I kept getting an error message. I did comment out the sound code that I had at the top for you guys to look at.

 

//import processing.sound.*;
//SoundFile file;

//void setup() {
// size(640, 360);
//background(255);

//file = new SoundFile(this, “paul.mp4”);
// file.play();
//}

//void draw() {
//}

float my_num = 10;

void setup() {
size(400, 400);
background(#88F0E6);
fill(#CA9AEA);
noStroke();
smooth();
rectMode(CENTER);
}
void draw() {
background(#88F0E6);

// move the origin to a random position in the screen.
// the random position is calculated using the noise() function
translate(width * noise(my_num + 80), height * noise(my_num + 100));

// add some random rotation using noise()
rotate(10 * noise(my_num + 40));

// draw a rectangle with a random width and height, again using noise()
rect(0, 0, 200 * noise(30 + my_num), 200 * noise(my_num));

// increase the counter variable which is used in noise() calls.
my_num = my_num + 0.02;
}

imageJust tell me what you want computer. What more do you want?