xxxxxxxxxx
float angle = 0.0;
float speed = 100;
float radius = 10.0;
float sx = 7.0;
float sy = 6.0;
void setup() {
size(400, 400);
noStroke();
}
void draw() {
fill(0, 12);
rect(0, 0, width, height);
angle += speed;
float sinval = sin(angle);
float cosval = cos(angle);
float x = 200 + (cosval * radius);
float y = 200 + (sinval * radius);
fill(80, 150, 700);
ellipse(x, y, 30, 30);
float x2 = x + cos(angle * sx) * radius/2;
float y2 = y + sin(angle * sy) * radius/2;
}