星期六, 六月 19, 2010
where is she going musical
import ddf.minim.*;
Minim minim;
AudioPlayer aaplayer;
int i = 0;
void setup()
{
background(2,10,10);
smooth();
size(800,400);
frameRate(50);
minim = new Minim(this);
aaplayer =
minim.loadFile("http://soundcloud.com/djpauldavies/dj-paul-davies-in-the-night-garden-vol1-03-04-10/download");
aaplayer.play();
}
void draw(){
//pushMatrix();
fill(30,200,10,10);
stroke(255.0*abs(cos(frameCount/100.0)), 255.0*abs(cos(frameCount/100.0)), 200.0*abs(cos(frameCount/100.0)), 255.0*abs(cos(frameCount/100.0)));
float brightness = abs(cos(frameCount/100.0));
// this bit rotates the whole thing by 45 degrees clockwise, so it looks more like a cylinder
translate(width * .5, height * .5);
rotate(PI/4);
translate(-width * .5, -height * .5);
translate(cos(radians(i / 1.0)) * (200.0*cos(i/100.0)) + (width / 2.0), sin(radians(i)) * (200.0*sin(i/100.0)) + (height/2.0));
rotate(i / 20.0);
line(0, 0, (i%1+sin(frameCount/10.0)*20.0)*brightness, (i%20)*brightness);
// popMatrix();
i++;
}
void mousePressed(){
background(255);
i=0;
}
Minim minim;
AudioPlayer aaplayer;
int i = 0;
void setup()
{
background(2,10,10);
smooth();
size(800,400);
frameRate(50);
minim = new Minim(this);
aaplayer =
minim.loadFile("http://soundcloud.com/djpauldavies/dj-paul-davies-in-the-night-garden-vol1-03-04-10/download");
aaplayer.play();
}
void draw(){
//pushMatrix();
fill(30,200,10,10);
stroke(255.0*abs(cos(frameCount/100.0)), 255.0*abs(cos(frameCount/100.0)), 200.0*abs(cos(frameCount/100.0)), 255.0*abs(cos(frameCount/100.0)));
float brightness = abs(cos(frameCount/100.0));
// this bit rotates the whole thing by 45 degrees clockwise, so it looks more like a cylinder
translate(width * .5, height * .5);
rotate(PI/4);
translate(-width * .5, -height * .5);
translate(cos(radians(i / 1.0)) * (200.0*cos(i/100.0)) + (width / 2.0), sin(radians(i)) * (200.0*sin(i/100.0)) + (height/2.0));
rotate(i / 20.0);
line(0, 0, (i%1+sin(frameCount/10.0)*20.0)*brightness, (i%20)*brightness);
// popMatrix();
i++;
}
void mousePressed(){
background(255);
i=0;
}
info
submitted by:
DARYL_Gammaviews: 1002
a drunk butterfly. Music by DJ Paul Davies - In The Night Garden - Vol1- 03 04 10. Listen to his music at: http://soundcloud.com/djpauldavies

comments

Add a comment: