//noise – perlian noise – random sequence generator
// replace noise with sin – cos – tan or radians
//PI – circles – PI HALF_PI QUARTER_PI

// sketch >import library >add library >search syphon
import codeanticode.syphon.*;

SyphonServer server;

void settings() {
size(400,400, P3D);
PJOGL.profile=1;
}

void setup() {
server = new SyphonServer(this, “Processing Syphon”);
size(400, 400);
rectMode(CENTER);
}

void draw(){
background(mouseX, 255-mouseY/2, 200);
// modulate values with perlin noise

//vars for shape 1
float ang1 = sin(0.01*frameCount + 10);
float tx = 30 * sin(0.01*frameCount + 40);
// size for rect 1 – replace with sin
float size1 = 200 * noise(0.01*frameCount + 60);

float ang2 = PI * noise(0.01*frameCount + 20);
float rx = 200 * noise(0.01*frameCount + 50);
float size2 = 50 * sin(0.01* frameCount + 60);

float ang3 = QUARTER_PI * noise(0.01*frameCount + 30);
float size3 = 50 * cos(0.01* frameCount + 60);
float cx = 100 * noise(0.01*frameCount + 80);

float ang4 = PI * noise(0.01*frameCount + 30);
float size4 = 5 * cos(0.01* frameCount + 60);
float px = 100 * sin(0.01*frameCount + 80);

translate(width/2, height/2);
for (int i = 0; i < 8; i++) {
noFill();
stroke(255, 5, 225);
pushMatrix();
rotate(ang1 + TWO_PI * i/8);
//translate(tx, 0);
rect(0, 0, size1, size1);
noStroke();
fill(mouseY/2, mouseX/2, 200, 100);
ellipse(0,0, size2, size2);
for (int j = 0; j < 6; j++) {
pushMatrix();
rotate(ang2 + TWO_PI * j / 6);
translate(rx, 0);
rotate(ang3);
noFill();
stroke(246, 255, 5);
rect(rx, 0, size3, size2);
//for(int x=5; x<500; x=x+50){
// for(int y=5; y<500; y=y+50){
// pushMatrix();
// translate(x,y);
fill(mouseX*mouseY/3, 200, 50, 80);
stroke(mouseY, 160, 100);
triangle(cx, cx, cx, size2/2, size2/2, size2/2);
// popMatrix();
// }
//}
fill(mouseY, 150, 50, 80);
ellipse(cx, 0, size2, size2);
fill(255, 0, mouseX, 100);
ellipse(cx, 100, size3, size3);
popMatrix();

}
popMatrix();
}

//translate(width/2, height/2);
for (int i = 0; i < 8; i++) {
pushMatrix();
rotate(TWO_PI * i / 8);
float sx = 200 * noise(0.01*frameCount); //processing 60 frames/sec
translate(sx, 0);
stroke(mouseX);
noFill();
fill(255, 150);
ellipse(0, 0, 30, 30);
for (int j = 0; j < 6; j++) {
pushMatrix();
rotate(TWO_PI * j / 6);
float ex = 60 * noise(0.01*frameCount + 10);
rect(ex, 0, 10, 10);
popMatrix();
}
popMatrix();
}
server.sendScreen();
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s