void setup() { size(400, 500, P3D); background(10); } void draw() { background(10); // pushMatrix(); translate(width/2, height/2, 0); rotateZ(radians(mouseY)); rotateY(radians(mouseX)); translate(-width/2, -height/2, 0); // popMatrix(); fill(255); smooth(); noStroke(); lights(); pushMatrix(); // Save old origin settings translate(width/2, height/2, 0); sphereDetail(60); sphere(30); popMatrix(); // restore settings pushMatrix(); translate(width/2, height/2 + 90, 0); fill(120, 230, 200); sphere(60); popMatrix(); }