diff --git a/geometric_separators.pde b/geometric_separators.pde index 6c4b674..5a2f0a4 100644 --- a/geometric_separators.pde +++ b/geometric_separators.pde @@ -1,9 +1,13 @@ - // Reset Button int reset_x = 100; -int reset_y = 400; +int reset_y = 450; int reset_w = 100; -int reset_h = 50; +int reset_h = 25; +// Calculate Button +int calc_x = 250; +int calc_y = 450; +int calc_w = 100; +int calc_h = 25; // Button Shapes PShape reset; PShape calculate; @@ -12,11 +16,11 @@ ArrayList input = new ArrayList(); // Setup void setup() { - background(0); + background(255); size(500,500,P2D); - // Create reset button + // Create buttons reset = createShape(RECT, reset_x, reset_y, reset_w, reset_h); - + calculate = createShape(RECT, calc_x, calc_y, calc_w, calc_h); noLoop(); } @@ -28,7 +32,7 @@ void mousePressed() { input.clear(); } else { - PShape new_ellipse = createShape(ELLIPSE, mouseX, mouseY, 50, 50); + PShape new_ellipse = createShape(ELLIPSE, mouseX - 12.5, mouseY - 12.5, 25, 25); input.add(new_ellipse); } redraw(); @@ -36,9 +40,13 @@ void mousePressed() { // Draw void draw() { - background(0); + background(255); shape(reset); + shape(calculate); + text("Reset.", reset_x + 25, reset_y - 10); + text("Calculate.", calc_x + 25, calc_y - 10); for (PShape ellipse : input) { shape(ellipse); + fill(0); } }