Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
int qty = 14000;
float a = 0.1;
float mult;
void setup() {
size(1000, 800,P3D);
noFill();
strokeWeight(0.1);
colorMode(HSB);
mult = height/2;
}
void draw() {
background(0);
translate(width/2, height/2);
//float a = 0;
stroke(200, 50, 80, 90);
for (int k =0; k < qty; k++) {
float c = map(k,0,qty,0,360);
stroke(c,200,255,120);
float ten = (10*PI*k)/qty;
float sixteen = (16*PI*k)/qty;
float rad = (1 - 0.5*pow(cos(sixteen), 2));
float x = cos(ten)*rad*mult;
float y = sin(ten)*rad*mult;
float r = 1/200 + 0.1*pow(sin(52*PI*k/qty), 4)*mult+sin(a)*100;
ellipse(x, y, r*2, r*2);
}
a+=0.1;
/*
if(a<=TWO_PI){
saveFrame("images/#######.tiff");
}else{
stop();
}
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.