Rotate 3D Sphere in Processing

import processing.opengl.*;

int  i=1;
void setup()
{

  size(640, 480, OPENGL);
}

void draw()
{
background(228,224,0);
lights();

translate(width/2,height/2,250);
float  AngleY=radians(i);

i++;

rotateX(AngleY);
fill(250,0,250);
sphereDetail(25);
sphere(50);

}