xxxxxxxxxx
//how many circles do i want
float numberofCircles = 15;
// what is the angle between the center pt. and the circles
float angle = radians (360 / numberofCircles);
// how far are my circles from the center
float distance = 50;
// offset = how much do i want my circles to move
float offset = radians (90);
// move my offset slowly, so the number is very low
float counter = 0.01;
void setup() {
size (300, 300);
// only need to use this once, effects everything.
smooth();
}
void draw () {
background (#23397a); // blue
fill (#f9f509); // yellow
noStroke();
for (int i = 1; i <= numberofCircles; i++) {
// cos/sin (angle * i `so it draws all our things
// + offset so we can move things
// times distance between the center and the circle
// + the center
float x = cos(angle *i + offset) * distance + width/2;
float y = sin(angle *i + offset) * distance + height/2;
ellipse (x, y, 10, 10);
}
for (int i = 1; i <= numberofCircles; i++) {
// cos/sin (angle * i `so it draws all our things
// + offset so we can move things
// times distance between the center and the circle
// + the center
float x = cos(angle *i - offset) * (distance+50) + width/2;
float y = sin(angle *i - offset) * (distance+50) + height/2;
ellipse (x, y, 10, 10);
}
offset = offset + counter;
}