MyObject b = new MyObject(40); //create an object void setup(){ size(500,500, P3D); //setup the screen camera(-100,100,-100,0,0,0,0,0,1); //get a viewpoint } void draw(){ background(255); pointLight(255, 255, 255, -200,300,-400); b.draw3(); //draw the object }