We are about to switch to a new forum software. Until then we have removed the registration on this forum.
i think my question is about offset shapes and rotation
very new to this
right now i have one roatating circle followed by a trail of other circles.. i want to create multiples of this same effect on the screen but cant figure it out? i have tried copying that part of the code with other coordinates where" x" and "y" are but that circle fails to move.
here's what I have :
float angle = 0.0;
float offset = 60;
float scalar = 30;
float speed = 0.05;
void setup() {
size(820, 820);
smooth();
}
void draw() {
float x = offset + cos(angle) * scalar;
float y = offset + sin(angle) * scalar;
ellipse( x, y, 40, 40);
angle += speed;
}
and i just want to add more of the same thing
gah so simple i bet i just can't figure it out
Answers
You can either turn every ellipse()'s property into arrays or define a class to hold those properties.
Here is an example using a loop: