Library Component
Figure A: Display Component Block Diagram
- Download Library from this Link: Pov3D-0.1.5.zip
(Full source Library Source Code at GitHub ) - Complete Library Documentation: JavaDoc
Brief Overview
Drawing the display require you create a display object, then in the draw method of you sketch, 1st Clear it, then draw “primitives” into it, and finally export() it to the display….
POVDisplay g_display = null;
setup() {
// ...
g_display = new POVDisplay("10.10.1.99"/* Display IP */, 90 /* Slices */);
// ...
}
draw() {
g_display.clear(); // clear volume
// drawing to volume
// eg. Dots,Spheres,Lines
g_display.dot(0,0,0); // simplest draw function,
g_display.export(); // send volume to display
}
Drawing Primitives currently include.
- Dot
- Sphere
- Line
- Box
- Poly (line)
Some Examples:
g_display.dot(0,0,0); Sphere s = new Sphere(2, DrawMode.OUTLINE); s.draw();
they can be combined with Matrix transformation functions, which are stacked. See the “ThreeDeeMe” working example in the library’s example folder, or this code for inspiration.
g_display.pushMatrix();
for(int i = 0; i < 72; i++) {
g_display.dot(10,0,0);
g_display.rotateY(radians(5 /* Degrees */ ));
}
g_display.popMatrix();
The matrix functions include:
- popMatrix()
- pushMatrix()
- resetMatrix()
- rotateX(float angle)
- rotateY(float angle)
- rotateZ(float angle)
- scale(float s)
- scale(float x, float y, float z)
- sphere(processing.core.PVector pos, int size)
- translate(float tx, float ty, float tz)
- translate(PVector p)
Complete documentation is here: POVDisplay
