Processing Library

Library Component
On Left side, 3 compontnents, the Processing Sketch, the Processing Library and a UDP Library, then connected to on the right, the Dive component, and a bash script running it, on the Display.

Figure A: Display Component Block Diagram

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(""/* Display IP */, 90 /* Slices */);
  // ...
draw() {
  g_display.clear(); // clear volume
  // drawing to volume
  // eg. Dots,Spheres,Lines,0,0); // simplest draw function, 
  g_display.export(); // send volume to display

Drawing Primitives currently include.

  1. Dot
  2. Sphere
  3. Line
  4. Box
  5. Poly (line)

Some Examples:,0,0); 
Sphere s = new Sphere(2, DrawMode.OUTLINE);

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.

for(int i = 0; i < 72; i++) {,0,0);
    g_display.rotateY(radians(5 /* Degrees */ ));

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

Leave a Reply

I'm a human because I know: