2021-07-29 22:30:32 +00:00
|
|
|
PImage img;
|
|
|
|
import processing.svg.*;
|
|
|
|
|
|
|
|
float EYE = 5.0;
|
|
|
|
|
|
|
|
void settings() {
|
|
|
|
System.setProperty("jogl.disable.openglcore", "false");
|
2021-07-30 04:09:12 +00:00
|
|
|
size(900, (900 / 4) * 3, P3D);
|
2021-07-29 22:30:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void setup() {
|
|
|
|
noLoop();
|
|
|
|
background(#ffffff);
|
|
|
|
noFill();
|
|
|
|
strokeWeight(2);
|
|
|
|
}
|
|
|
|
|
2021-07-30 04:09:12 +00:00
|
|
|
void drawBox (int x, int y, int z) {
|
2021-07-29 22:30:32 +00:00
|
|
|
push();
|
2021-07-30 04:09:12 +00:00
|
|
|
translate(x, y, z);
|
|
|
|
rotateY(radians(frameCount + 60));
|
2021-07-29 22:30:32 +00:00
|
|
|
box(45);
|
|
|
|
pop();
|
|
|
|
}
|
|
|
|
|
|
|
|
void draw() {
|
|
|
|
background(#ffffff);
|
|
|
|
camera(70.0 + (EYE / 2), 35.0, 120.0, 50.0, 50.0, 35.0 / 2,
|
|
|
|
0.0, 1.0, 0.0);
|
|
|
|
beginRaw(SVG, "left.svg");
|
|
|
|
stroke(255, 0, 0, 124);
|
2021-07-30 04:09:12 +00:00
|
|
|
drawBox(50, 50, 0);
|
2021-07-29 22:30:32 +00:00
|
|
|
endRaw();
|
|
|
|
|
|
|
|
camera(70.0 - (EYE / 2), 35.0, 120.0, 50.0, 50.0, 35.0 / 2,
|
|
|
|
0.0, 1.0, 0.0);
|
|
|
|
//background(#ffffff);
|
|
|
|
beginRaw(SVG, "right.svg");
|
|
|
|
stroke(0, 0, 255, 124);
|
2021-07-30 04:09:12 +00:00
|
|
|
drawBox(50, 50, 0);
|
2021-07-29 22:30:32 +00:00
|
|
|
endRaw();
|
|
|
|
|
2021-07-30 04:09:12 +00:00
|
|
|
save("left_right.png");
|
|
|
|
}
|