xxxxxxxxxx
//Big Circle Ring
float numCirc = 10;
float angle = radians(360/numCirc); // angle between stuff
float offset = radians(90); // PI/2; // since PI = 180
float radius = 80;
float eWidth, counter;
//Smaller Circle Ring
float numCirc2 = 5;
float angle2 = radians(360/numCirc2); // angle between stuff
float offset2 = radians(90); // PI/2; // since PI = 180
float radius2 = 30;
float eW2, counter2;
// drawing circles using x, and y
float x, y;
// radius for other circles
float funkyAngle = 0;
float eW3, eW4;
float rad3 = 150;
float rad4 = 210;
void setup() {
size (500, 500);
smooth();
eWidth = 20;
counter = 0.03;
eW2 = 10;
counter2 = -0.04;
eW3 = 7;
eW4 = 15;
}
void draw () {
background(255);
fill (255, 0, 0);
noStroke();
for (int i = 1; i <= numCirc2; i++) {
float x = cos (angle2 * i + offset2) * radius2 + width/2;
float y = sin (angle2 * i + offset2) * radius2 + height/2;
ellipse (x, y, eW2, eW2);
}
offset2 = offset2 + counter2;
fill (0);
//make spinning ellipses
//We want to move the circles evenly, so the offset cannot be an increment, it has to be even,
for (int i = 1; i <= numCirc; i++) {
float x = cos (angle * i + offset) * radius + width/2;
float y = sin (angle * i + offset) * radius + height/2;
ellipse (x, y, eWidth, eWidth);
}
offset = offset + counter;
// make funky spinning ellipses
// since we are multiplying i to angle, so it increments weirdly
fill (0, 255, 0);
for (int i = 1; i <= numCirc; i++) {
float x = cos (funkyAngle * i) * rad3 + width/2;
float y = sin (funkyAngle * i) * rad3 + height/2;
ellipse (x, y, eW3, eW3);
}
funkyAngle = funkyAngle+counter*radians(5); // radians(5) = 0.001
// println(radians(5)); // test to see what this number returns
// // no Spin only draw circle
fill(50, 100, 150);
for (int i = 1; i <= numCirc; i++) {
float x = cos (angle * i) * rad4 + width/2;
float y = sin (angle * i) * rad4 + height/2;
ellipse (x, y, eW4, eW4);
}
}