Update some of the left_right sketch with changes made for left_right_spacing exercise

This commit is contained in:
Matt McWilliams 2021-07-30 00:09:12 -04:00
parent db806a9eef
commit 2015260810
2 changed files with 11 additions and 9 deletions

View File

@ -1,2 +1,2 @@
.svg *.png
.png *.svg

View File

@ -5,7 +5,7 @@ float EYE = 5.0;
void settings() { void settings() {
System.setProperty("jogl.disable.openglcore", "false"); System.setProperty("jogl.disable.openglcore", "false");
size(900, 900, P3D); size(900, (900 / 4) * 3, P3D);
} }
void setup() { void setup() {
@ -15,10 +15,10 @@ void setup() {
strokeWeight(2); strokeWeight(2);
} }
void drawBox () { void drawBox (int x, int y, int z) {
push(); push();
translate(50, 50, 0); translate(x, y, z);
rotateY(radians(frameCount + 60)); rotateY(radians(frameCount + 60));
box(45); box(45);
pop(); pop();
} }
@ -29,7 +29,8 @@ void draw() {
0.0, 1.0, 0.0); 0.0, 1.0, 0.0);
beginRaw(SVG, "left.svg"); beginRaw(SVG, "left.svg");
stroke(255, 0, 0, 124); stroke(255, 0, 0, 124);
drawBox(); drawBox(50, 50, 0);
text();
endRaw(); endRaw();
camera(70.0 - (EYE / 2), 35.0, 120.0, 50.0, 50.0, 35.0 / 2, camera(70.0 - (EYE / 2), 35.0, 120.0, 50.0, 50.0, 35.0 / 2,
@ -37,7 +38,8 @@ void draw() {
//background(#ffffff); //background(#ffffff);
beginRaw(SVG, "right.svg"); beginRaw(SVG, "right.svg");
stroke(0, 0, 255, 124); stroke(0, 0, 255, 124);
drawBox(); drawBox(50, 50, 0);
endRaw(); endRaw();
save("left_right.png"); save("left_right.png");
}