float angle = 0.0; int n = 10; int n1 = 4; int rds = 150; void setup() { size(500,500); }
void draw() { angle += n1*TWO_PI/n; int x1 = round(250 + rds*cos(angle)); int y1 = round(250 + rds*sin(angle)); angle += n1*TWO_PI/n; int x2 = round(250 + rds*cos(angle)); int y2 = round(250 + rds*sin(angle)); line(x1,y1,x2,y2); ellipse(round(250 + (rds+10)*cos(angle)),round(250 + (rds+10)*sin(angle)),10,10); if (angle > 30) angle = 0; }