Advertisement
andrewb

circle.pde

Mar 9th, 2015
574
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. float centerX;
  2. float centerY;
  3. float sizeXY;
  4.  
  5. void setup() {
  6.   size(1366,768);
  7.   background(0x00, 0X00, 0X00);
  8.   strokeWeight(2);
  9.   stroke(0xee, 0Xaa, 0Xee);
  10.   fill(0x00, 0X00, 0X00);
  11.   centerX = width / 2;
  12.   centerY = height / 2;
  13.   sizeXY = 800;
  14. }
  15.  
  16. void draw() {
  17.   line(0, 0, width, height);
  18.   line(0, height, width, 0);
  19.   drawMyCircle();
  20.   drawMyCircle();
  21.   line(centerX, 0, centerX, height);
  22.   line(0, centerY, width, centerY);
  23.   drawMyCircle();
  24.   noLoop();
  25.   save("c:/andy/circles.png");
  26.   exit();
  27. }
  28.  
  29. void drawMyCircle() {
  30.   if (sizeXY > 0) {
  31.     ellipse(centerX, centerY, sizeXY, sizeXY);
  32.   }
  33.   sizeXY = sizeXY - 300;  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement