PaperScreen model in PapARt


#1

PaperScreen model.

A PaperScreen is a sub-sketch, a mini sketch that runs inside the main sketch.

Motivation.

For AR applications there are usually multiple objects or places. Each have a different meaning, interface, interactive possiblities. A PaperScreen represents such a surface.

Initialisation

In most examples, the default PaperScreen looks like this:

public class MyApp extends PaperScreen {
  public void settings() {
    setDrawingSize(297, 210);
    loadMarkerBoard(Papart.markerFolder + "A4-default.svg", 297, 210);
    setDrawOnPaper();
  }
  public void setup() {}
  public void drawOnPaper() {
    background(100, 0, 0, 100);
  }
}

The drawOnPaper() method replaces the draw from Processing. In some sketches it is drawAroundPaper(), the difference is explained further in this tutorial.

// Size in millimeters for rendering, this is size is A4. 
    setDrawingSize(297, 210);
// Load a tracked piece of paper. This second size is the physical size.
    loadMarkerBoard(Papart.markerFolder + "A4-default.svg, 297, 210");

    setDrawOnPaper();

Dedicated examples


Display model in PapARt
Hack'1 Cerveau : vulgarisation de machine learning avec la Réalité Augmentée
Quick start with a webcam
PapARt 1.2 - First wide audience release