home processing download documents tutorial python tutorial gallery source about
 Tutorials (back to the list of tutorials)

Basics of iGeo in Processing

     First Line to Write

import processing.opengl.*;
import igeo.*;

size( 480, 360, IG.GL );

After having "import" lines for the libraries, the first line to write is "size" method. The first number of the input arguments specifies window width and the second one does window height. The third one IG.GL tells processing to use iGeo and this instantiates iGeo system in the background. Write this line before use of any iGeo methods or iGeo classes (except configuration setting of iGeo system).


     Run the Sketch

To run the sketch, either click the Run button, type Control+R or go to the menu "Sketch" > "Run".


     Navigation of 3D View by Mouse & Keyboard

When you run the sketch, it shows 4 different views of perspective, top, front and right as default.

The following code shows the view above.

import processing.opengl.*;
import igeo.*;

size( 480, 360, IG.GL );

IG.open("example_surf1.3dm");

To navigate the 3D views, use mouse and keyboard as follows.

ROTATION: Mouse left button with/without alt key. Or arrow keys.

PAN: Mouse middle button or left button + shift key. Or shift +arrow keys.

ZOOM: Mouse right button or left button + control key. Or control +arrow keys.

TOGGLE VIEW: Mouse double click of the view. Or space key.

FOCUS VIEW ON EXISTING OBJECTS: Type f key.

SAVE FILES: Type control + s key.

QUIT AND CLOSE: Type control + w or q key.


     Shading Modes

iGeo has 5 different shading modes.

WIREFRAME : Type w key.

SHADE: Type s key.

TRANSPARENT SHADE: Type t key.

SHADE WITHOUT EDGES: Type shift + s key.

TRANSPARENT SHADE WITHOUT EDGES:
Type shift + t key.


(back to the list of tutorials)

HOME
FOR PROCESSING
DOWNLOAD
DOCUMENTS
TUTORIALS (Java / Python)
GALLERY
SOURCE CODE(GitHub)
ABOUT