PImage logo;
float thetaX=0;
float thetaY=0;

float s;      // scale factor to fit logo.

void setup() {
  size(800, 800, P3D);  // need 3D renderer

  logo = loadImage("http://www.slu.edu/Documents/marketing_communications/logos/slu/SLU_Billiken_WhiteBorder_RGB.png");
  s = min(0.5*width/logo.width, 0.5*height/logo.height);
}

void draw() {
  background(200, 200, 255);
  translate(0.5*width, 0.5*height);
  scale(s);
  
  rotateX(thetaX);
  rotateY(thetaY);
  
  image(logo, -0.5*logo.width, -0.5*logo.height);

}

void mouseDragged() {
  thetaY += TWO_PI * (mouseX-pmouseX) / width;
  thetaX -= TWO_PI * (mouseY-pmouseY) / height;
}