andrewb icon

circle.pde

andrewb | PRO | 03/10/15 12:07:32 AM UTC | 0 ⭐ | 976 👁️ | Never ⏰ | []
Java |

640 B

|

None

|

0 👍

/

0 👎

float centerX;
float centerY;
float sizeXY;
 
void setup() {
  size(1366,768);
  background(0x00, 0X00, 0X00);
  strokeWeight(2);
  stroke(0xee, 0Xaa, 0Xee);
  fill(0x00, 0X00, 0X00);
  centerX = width / 2;
  centerY = height / 2;
  sizeXY = 800;
}
 
void draw() {
  line(0, 0, width, height);
  line(0, height, width, 0);
  drawMyCircle();
  drawMyCircle();
  line(centerX, 0, centerX, height);
  line(0, centerY, width, centerY);
  drawMyCircle();
  noLoop();
  save("c:/andy/circles.png");
  exit();
}
 
void drawMyCircle() {
  if (sizeXY > 0) {
    ellipse(centerX, centerY, sizeXY, sizeXY);
  }
  sizeXY = sizeXY - 300;  
}

Comments