43 lines
782 B
Plaintext
43 lines
782 B
Plaintext
|
PImage img;
|
||
|
import processing.svg.*;
|
||
|
|
||
|
float EYE = 5.0;
|
||
|
|
||
|
void settings() {
|
||
|
System.setProperty("jogl.disable.openglcore", "false");
|
||
|
size(900, 900, P3D);
|
||
|
}
|
||
|
|
||
|
void setup() {
|
||
|
noLoop();
|
||
|
background(#ffffff);
|
||
|
noFill();
|
||
|
strokeWeight(2);
|
||
|
}
|
||
|
|
||
|
void drawBox () {
|
||
|
push();
|
||
|
translate(50, 50, 0);
|
||
|
rotateY(radians(frameCount + 60));
|
||
|
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);
|
||
|
drawBox();
|
||
|
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);
|
||
|
drawBox();
|
||
|
endRaw();
|
||
|
|
||
|
save("left_right.png");
|