From 2015260810363f297fd58787259888f77b4e480d Mon Sep 17 00:00:00 2001 From: mattmcw Date: Fri, 30 Jul 2021 00:09:12 -0400 Subject: [PATCH] Update some of the left_right sketch with changes made for left_right_spacing exercise --- left_right/.gitignore | 4 ++-- left_right/left_right.pde | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/left_right/.gitignore b/left_right/.gitignore index 0f8206e..664db10 100644 --- a/left_right/.gitignore +++ b/left_right/.gitignore @@ -1,2 +1,2 @@ -.svg -.png \ No newline at end of file +*.png +*.svg diff --git a/left_right/left_right.pde b/left_right/left_right.pde index c5f956c..5eb2c92 100644 --- a/left_right/left_right.pde +++ b/left_right/left_right.pde @@ -5,7 +5,7 @@ float EYE = 5.0; void settings() { System.setProperty("jogl.disable.openglcore", "false"); - size(900, 900, P3D); + size(900, (900 / 4) * 3, P3D); } void setup() { @@ -15,10 +15,10 @@ void setup() { strokeWeight(2); } -void drawBox () { +void drawBox (int x, int y, int z) { push(); - translate(50, 50, 0); - rotateY(radians(frameCount + 60)); + translate(x, y, z); + rotateY(radians(frameCount + 60)); box(45); pop(); } @@ -29,7 +29,8 @@ void draw() { 0.0, 1.0, 0.0); beginRaw(SVG, "left.svg"); stroke(255, 0, 0, 124); - drawBox(); + drawBox(50, 50, 0); + text(); endRaw(); camera(70.0 - (EYE / 2), 35.0, 120.0, 50.0, 50.0, 35.0 / 2, @@ -37,7 +38,8 @@ void draw() { //background(#ffffff); beginRaw(SVG, "right.svg"); stroke(0, 0, 255, 124); - drawBox(); + drawBox(50, 50, 0); endRaw(); - save("left_right.png"); \ No newline at end of file + save("left_right.png"); +}