Interactive

Week 1:

Mondarian

mondarian

//homework: niki jones

size(515, 511);
background(#fcfdee);

//red square

stroke (0);
strokeWeight(10);
fill (#e13523);
rect(80,60,257,255);

//black square
fill(0);
rect (80,315,130,130);

//yellow square
strokeWeight(0);
fill(#f7d16e);
rect (333,0,167,185);

//vertical yellow rectangle
strokeWeight(0);
fill(#f7d16e);
rect (0,380,84,130);

//blue rectangle
strokeWeight(0);
fill(#1d1da5);
rect (335, 388, 161, 93);

//mini black rectangle
strokeWeight(0);
fill(0);
rect(210,447, 125,44);

//red square

stroke (0);
strokeWeight(10);
fill (#e13523);
rect(494,384,33,130);

//lines

strokeCap(SQUARE);
strokeWeight(10);
line(20, 60, 500,60);
line(333, 180, 490,180);

line(80, 60, 80, 490 );

//vertical line above red square
line(140, 60, 140, 10 );

// middle left of square
line(20, 200, 80, 200);
//vertical line left of blue square
line(337, 5, 337, 490 );

//vertical line far right
line(495, 22, 495, 500 );

//middle line of white square
line(416, 180, 416, 320 );

//line below yellow square
line(140, 60, 140, 10 );

//line through black square
line(14, 384, 515,384);
//line underneath black square
line(80, 445, 340,445);
//horizontal line through white square
line(80, 315, 490,315);

//line underneath blue square
line(340,485,490,485);

line(210, 500, 210, 320);

Make Me Move (Version 1)

untitled-25

// week 1 dynamic sketchvoid setup(){
size(600, 400);
background(#fcdef5);}void draw(){// rectMode(CENTER);
noStroke();
//dark blue
fill(0,104, 200, 10);
ellipse(mouseX, mouseY+30, 20, 20);
ellipse(mouseX, mouseY-30, 20, 20);
ellipse(mouseX+30, mouseY, 20, 20);
ellipse(mouseX-30, mouseY, 20, 20);//lightblue
fill(183,236,249, 100);
ellipse(mouseX+20, mouseY+20, 40, 40);
ellipse(mouseX-20, mouseY-20, 40, 40);
ellipse(mouseX-20, mouseY+20, 40, 40);
ellipse(mouseX+20, mouseY-20, 40, 40);fill (#fff100);
ellipse(mouseX, mouseY, 30, 30);}

Week 2:

Make Me Move Improvements

Untitled-1.gif

// week 1 dynamic sketchfloat r;
float g;
float b;
float a;
void setup(){
size(600, 400);
frameRate(5);}void draw(){
background(239, 203, 230);
r=random(255);
g=random(255);
b=random(255);
a=random(255);// rectMode(CENTER);//dark blue
fill(46, 48, 146, 100);
ellipse(mouseX, mouseY+30, 20, 20);
ellipse(mouseX, mouseY-30, 20, 20);
ellipse(mouseX+30, mouseY, 20, 20);
ellipse(mouseX-30, mouseY, 20, 20);fill (mouseX, 48, 146, 100);
ellipse(pmouseX, mouseY+60, 10, 10);
ellipse(pmouseX, mouseY-60, 10, 10);
ellipse(mouseX+60, pmouseY, 10, 10);
ellipse(mouseX-60, pmouseY, 10, 10);//lightblue
fill(random(255), random(255), random(255));
ellipse(mouseX+20, mouseY+20, 40, 40);
ellipse(mouseX-20, mouseY-20, 40, 40);
ellipse(mouseX-20, mouseY+20, 40, 40);
ellipse(mouseX+20, mouseY-20, 40, 40);fill (252,237,30);
ellipse(mouseX, mouseY, 30, 30);
}

Moving Circle

circlee.gif

//boouncing ballfloat a;
float circleX=0;
float circleY=180;
float rad=16;
float circleA=0;
float circleB=180;
float circleC=0;
float circleD=180;void setup(){
size(600,360);}void draw (){background(255);
fill(175);
ellipse(circleX,circleY,rad,rad);
fill(55,155,237);
ellipse(circleA,circleB,rad,rad);
ellipse(circleC, circleD, rad,rad);//assign an increment to the circleX
//increment
circleX=circleX+10;
circleA=circleA+2;
circleC=circleC+2;
//condition: restart from the left edgeif(circleX>width+rad){
circleX=0;
}if(circleA>width+rad){
circleX=0;
}
if(circleC>height+rad){
circleY=0;
}
}

4 Quadrant Sketch

4quad

float b;
float c
float e;
float f;
float g;
float h;
float j;
float k;
float l;
void setup (){
size (800,600);
frameRate(30);
background (0);
}

void draw(){

b=random(0,width/2);
c=random(0,350);
e=random(width/2,width);
f=random(height/2,height);
h=random(width/2);
j=random(height/2);
k=random(width,width/2);
l=random(0,300);

stroke(255);
strokeWeight(1);
line (b,f,c,f);
ellipse(e,f,10,10);
//ellipse(k,l,10,10);

line(k,j,width/2,j);

ellipse(h,l,2,2);

}

void keyPressed(){
background(0,255);
}

4quad

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

void draw (){

background(0);

if (mouseXwidth/2)
{fill(255);
rect(height/2,width/2,width/2,height/2);}
//}else if(mouseY<height/2&&mouseX<width/2);
if (mouseXwidth/2){
fill(39,216,202);

{rect(0,300,width/2,height/2);
}}}

keyboard

void setup(){
size(800,400);
}

void draw(){
background(0);

if (mouseX>100){
fill(0);

rect(0,0, 100, 400);
}else if(mouseX200){
fill(0);

rect(100,0, 100, 400);
}else if(mouseX300){
fill(0);
rect(200,0,100,400);
}else if(mouseX400){
fill(0);
rect(300,0,100,400);
}else if(mouseX500){
fill(0);
rect(400,0,100,400);
}else if(mouseX600){
fill(0);
rect (500,0,100,400);
}else if (mouseX700){
fill(0);
rect(600,0,100,400);
}else if (mouseX800){
fill(0);
rect(700,0,100,400);
}else if(mouseX<700){
fill(0);
}else{
fill(2,51,47);
rect(700,0,100,400);}

}

translator

PImage translatorbg;
PFont f;
boolean button1=false, button2=false, button3=false, button4=false;void setup(){
size(792,412);
translatorbg=loadImage(“translatorbg.png”);
imageMode(CENTER);
f=loadFont(“HelveticaNeue-Medium-30.vlw”);}void draw(){
image(translatorbg,width/2,height/2+100);
strokeWeight(1);
stroke(143,191,229);line(220,50,220,318);
line(395,50,395,318);
line(572,50,572,318);
fill(143,191,229);
noStroke();
rect(60,40, 673, 30);
fill(143,191,229,40);
rect(60,220,673,100);
fill(0);
textFont(f,14);
text(“ENGLISH”, 104,60);
text(“ITALIAN”,285,60);
text(“GERMAN”,454,60);
text(“FRENCH”,628,60);
noStroke();if(button1){
noStroke();
noFill();rect (58,105,148,84);
fill(0);
textSize(16);
text(“GRAPHIC DESIGN”,72,275);
}else{
fill(#c0dbf2,80);
rect (58,105,148,84);
}
if(button2){fill(0);
textSize(16);
text(“DISEGNO GRAFICO”,234,275);
}else{
noStroke();
fill(#c0dbf2,80);
rect (236,105,148,84);
}
if(button3){fill(0);
textSize(16);
text(“GRAFIKDESIGN”,424,275);
}else{
noStroke();
fill(#c0dbf2,80);
rect (412,105,148,84);
}if(button4){fill(0);
textSize(16);
text(“GRAPHISME”,604,275);
}else{
noStroke();
fill(#c0dbf2,80);
rect (588,105,148,84);}}
void mousePressed(){
if ((mouseX>0)&&(mouseX250)&&(mouseX360)&&(mouseX550)&&(mouseX<700)){
button1=false;
button2=false;
button3=false;
button4=!button4;}}

25-dots

void setup(){
size(800,800);
smooth();
background(255);
}void draw(){
background(250);
fill (0);
for (int x=width/6; x<width-width/6; x=x+width/6){
for (int y=height/6; y<height-height/6; y=y+width/6){ellipse(x,y,50,50);}}}

dotgra

void setup(){
size(800,800);
smooth();
background(255);
}
void draw(){
noStroke();for (int x=width/6; x<width-width/6; x=x+width/6){
for (int y=height/6; y<height-height/6; y=y+width/6){float c1=map(x,0,width,255,0);
fill (c1);ellipse(x,y,50,50);}}}

updown

void setup(){
size(800,800);
smooth();}void draw(){
background(255);
noStroke();for (int x=width/6; x<width-width/6; x=x+=width/6){
for (int y=height/6; y<height-height/6; y=y+=width/6){float c1=map(y,0,height,255,0);
fill (c1);ellipse(x,y,50,50);}}}

bigger

float size2;
void setup(){
size(800,800);
smooth();}void draw(){
background(255);
noStroke();for (int x=width/6; x<width-width/6; x=x+width/6){
for (int y=height/6; y=50){
size2=50;
ellipse(x,y,size2,size2);
}
else{ellipse(x,y,100,100);}}}
}

biglil

float size2;
void setup(){
size(800,800);
smooth();}void draw(){
background(255);
noStroke();for (int x=width/6; x<width-width/6; x=x+width/6){
for (int y=height/6; y=50){
size2=100;
ellipse(x,y,size2,size2);
}else{ellipse(x,y,50,50);}}}
}

variation

void setup(){
size(800,800);
smooth();}void draw(){
background(255);
noStroke();
noLoop();for (int x=width/6; x<width-width/6; x=x+width/6){
for (int y=height/6; y<height-height/6; y=y+width/6){float c1=random(20,60);
fill (0);ellipse(x,y,c1,c1);}}}

variation2.png

void setup(){
size(800,800);
smooth();}void draw(){
background(255);
noStroke();
noLoop();for (int x=width/6; x<width-width/6; x=x+width/6){
for (int y=height/6; y<height-height/6; y=y+width/6){float c1=random(40,60);
fill (0);ellipse(x,y,c1,c1);}}}


poem

// generative poetry

//a crazy president is …

float b;
float c;
float e;
float i;
float g;
float h;
float j;
float k;
float l;
PFont f, f2;

int y=50;

String [] art = { “a”, “the”, ” “, “an” };

String [] nou ={ “design”, “type composition”, “composition”, “color”, “vision”, “typeface”, “logo”, “brand identity”, “project”};

String [] adj = { “beautiful”, “conceptual”, “expressive”, “bold”, “a consistent”, “imaginative”, “professional”, “fascinating”, “expressive”, “emotional”, “bold”, “energetic”, “engaging”, “colorful”, “detailed”, “impressive”};

String [] ver = { “creates”, “designs”, “paints”, “outlines”, “shows”, “uses”, “displays”, “transforms”, “illustrates”, “shapes”, “expresses”};

String [] pre = { “form”, “vision”, “inspiration”, “skill”, “thought”, “design”};

void setup(){
size (700,700);
background (255);
fill(#04B7B5);
f=loadFont(“AvenirLTStd-Heavy-48.vlw”);
f2=loadFont(“Escafina-Low-48.vlw”);

//textFont(f,34);
frameRate(30);
new_sentence();

}

void write_word(String[] words){

int n = int (random(words.length));
text (words[n], random(380,400), y+40);
y=y+40;
}

void new_sentence(){
background (255);
y=50;
fill(#04B7B5);

textFont(f,34);
write_word(art);
fill(#af251e);
textFont(f2,34);
write_word(adj);
fill(#04B7B5);

textFont(f,34);
write_word(nou);
fill(#af251e);
textFont(f2,34);
write_word(ver);

//write_word(art);
fill(#04B7B5);
textFont(f,34);
write_word(adj);
fill(#af251e);
textFont(f2,34);
//write_word(nou);
write_word(pre);

}

//void mousePressed(){
// new_sentence();

//}

void draw(){
noFill();
b=random(0,width/2);
c=random(0,350);
e=random(width/2,width);
i=random(height/2,height);
h=random(width/2);
j=random(height/2);
k=random(width,width/2);
l=random(0,350);

stroke(#af251e);
fill (#04B7B5);
strokeWeight(1);

line (b,i,c,i);

//ellipse(k,l,10,10);
stroke(#04B7B5);

ellipse(h,l,2,2);

noFill();

ellipse(e,i,10,10);

if (frameCount % 200 == 0){

background(255);
new_sentence();
}
}

import ddf.minim.*;

Minim sound;
AudioSample s1;
AudioSample s2;
AudioSample s3;
AudioSample s4;
AudioSample s5;
// visual rhythm
PImage img,sleigh;

int n=0;

void setup(){
size(800, 600);

frameRate(7);
noStroke();
img=loadImage(“snowbg.png”);
sleigh=loadImage(“sleigh.png”);
image(img,0,0);
fill (255);

sound =new Minim(this);
s1=sound.loadSample(“sleighbells.wav”, 1024);
s2=sound.loadSample(“hohoho.wav”, 1024);
s3=sound.loadSample(“sleighbells.wav”, 1024);
s4=sound.loadSample(“water.wav”, 1024);
s5=sound.loadSample(“02 Wolfman.mp3”, 1024);

}

void draw(){

background(255);
image(img,0,0);

if (n% 2 == 0){
image(sleigh,50,50);
s1.trigger();
}

if (n % 3==1){
image(sleigh,200,200);
s1.trigger();
}
if (n % 4 ==2){
s1.trigger();
image(sleigh,440,100);
}

n=n+1;
}

import ddf.minim.*;
import ddf.minim.analysis.*;
PImage img,img2,img3,img4,img5;
int x=0;
int speed=1;
int speed2=1;
int g=10;

Minim minim;
AudioInput in;
FFT fft;
AudioPlayer song;

void setup(){
size (640,480);
minim=new Minim(this);
//in = minim.getLineIn(Minim.STEREO, 512);
//fft=new FFT(in.bufferSize(), in.sampleRate());
song=minim.loadFile(“01 Ho Ho Hopefully.mp3”);
song.play();
noStroke();
img=loadImage(“h0o.png”);
img2=loadImage(“lil.png”);
img3=loadImage(“la.png”);
img4=loadImage(“deer.png”);
img5=loadImage(“flakes.png”);

}

void draw (){
//frameRate(40);
background(#e7f5f6);
//fft.forward(in.mix);
noFill();
for(int i=0; i<song.bufferSize(); i+=130){
//line(i, height, i, height-fft.getBand(i)*1);
image(img, i+12, 135+song.right.get(i)*4);

for(int j=0; j<song.bufferSize(); j+=50){
image(img2, j-1, 245+song.right.get(j)*40);
for(int n=0; nwidth)||(x660)||(g<0)){
speed2=speed2*-1;

}
}

Advertisements