47 lines
858 B
Plaintext
47 lines
858 B
Plaintext
PImage img;
|
|
import processing.svg.*;
|
|
|
|
float EYE = 5.0;
|
|
int X = 50;
|
|
int Y = 50;
|
|
int Z = -10;
|
|
|
|
void settings() {
|
|
System.setProperty("jogl.disable.openglcore", "false");
|
|
size(900, (900 / 4) * 3, P3D);
|
|
}
|
|
|
|
void setup() {
|
|
noLoop();
|
|
background(#ffffff);
|
|
noFill();
|
|
strokeWeight(2);
|
|
}
|
|
|
|
void drawBox (int x, int y, int z) {
|
|
push();
|
|
translate(x, y, z);
|
|
box(45, 45, (45 / 4) * 3);
|
|
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_size.svg");
|
|
stroke(255, 0, 0, 124);
|
|
drawBox(X, Y, Z);
|
|
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_size.svg");
|
|
stroke(0, 0, 255, 124);
|
|
drawBox(X, Y, Z);
|
|
endRaw();
|
|
|
|
save("left_right_size.png");
|
|
}
|