Saturday, January 23, 2010
Palace of all colors v2
// modified from a sketch from Orgicus
float c = 0;
float r = 0;
float x,y;
void setup(){
background(0);
size(800,600);
smooth();
colorMode(HSB);
noStroke();
}
void draw(){
translate(width * .5, height * .5-frameCount/20+30);
x = cos(radians(c)) * r;
y = sin(radians(c)) * r;
if(x < 500 && y < 500){
//stroke(255,125,125,90);
//line(x,y,random(-5,5),random(-5,5));
stroke((sin(frameCount/50.0)+1.0)*255/2,255,255);
fill((sin(frameCount/50.0)+1.0)*255/2,255,255,5);
arc(0, 0, r, r, radians(c/1.1+1),radians(c));
stroke((sin(frameCount/50.0)+1.0)*255/2,255,255,40);
line(x,y,2,2);
//c += 1 - r/500;
c += 1 - log(r+200)/20;
r = (4500-frameCount)/10.0 + sin((4500-frameCount)/6.0)*10.0;
if (r <0 ) {noLoop();}
}
}
float c = 0;
float r = 0;
float x,y;
void setup(){
background(0);
size(800,600);
smooth();
colorMode(HSB);
noStroke();
}
void draw(){
translate(width * .5, height * .5-frameCount/20+30);
x = cos(radians(c)) * r;
y = sin(radians(c)) * r;
if(x < 500 && y < 500){
//stroke(255,125,125,90);
//line(x,y,random(-5,5),random(-5,5));
stroke((sin(frameCount/50.0)+1.0)*255/2,255,255);
fill((sin(frameCount/50.0)+1.0)*255/2,255,255,5);
arc(0, 0, r, r, radians(c/1.1+1),radians(c));
stroke((sin(frameCount/50.0)+1.0)*255/2,255,255,40);
line(x,y,2,2);
//c += 1 - r/500;
c += 1 - log(r+200)/20;
r = (4500-frameCount)/10.0 + sin((4500-frameCount)/6.0)*10.0;
if (r <0 ) {noLoop();}
}
}
info
submitted by: DARYL_Gammaviews:
There is a palace under the sea, where all the colors come from. It's full of people creating colors.

comments

Add a comment: