// πŸ‡ΈπŸ‡¬ size(120, 120); background(255); noStroke(); fill(152, 251, 152); int a[] = {1,4,2,5,3}; int b; float x; float y; float center_x; float center_y; for (int i = 0; i < 5; i++) { center_x = 50 * cos(2 * PI * i / 5 + PI / 2) + 60; center_y = 50 * sin(2 * PI * i / 5 - PI / 2) + 60; beginShape(); for (int j = 0; j < 5; j++) { b = a[j] - 1; x = 10 * cos(2 * PI * b / 5 + PI / 2) + center_x; y = 10 * sin(2 * PI * b / 5 - PI / 2) + center_y; vertex(x, y); } endShape(); }