public void drawColorCoord(float xlen,
float ylen, float zlen) {
GLUT glut = new GLUT();
if (coordOff) return; // cjx for images
gl.glBegin(GL.GL_LINES);
gl.glMaterialfv(GL.GL_FRONT, GL.GL_EMISSION, red,0);
gl.glColor3f(1, 0, 0);
gl.glVertex3f(0, 0, 0);
gl.glVertex3f(0, 0, zlen);
gl.glMaterialfv(GL.GL_FRONT, GL.GL_EMISSION, green,0);
gl.glColor3f(0, 1, 0);
gl.glVertex3f(0, 0, 0);
gl.glVertex3f(0, ylen, 0);
gl.glMaterialfv(GL.GL_FRONT, GL.GL_EMISSION, blue,0);
gl.glColor3f(0, 0, 1);
gl.glVertex3f(0, 0, 0);
gl.glVertex3f(xlen, 0, 0);
gl.glEnd();
// coordinate labels: X, Y, Z
gl.glPushMatrix();
gl.glTranslatef(xlen, 0, 0);
gl.glScalef(xlen/WIDTH, xlen/WIDTH, 1);
glut.glutStrokeCharacter(GLUT.STROKE_ROMAN, 'X');
gl.glPopMatrix();
gl.glPushMatrix();
gl.glMaterialfv(GL.GL_FRONT, GL.GL_EMISSION, green,0);
gl.glColor3f(0, 1, 0);
gl.glTranslatef(0, ylen, 0);
gl.glScalef(ylen/WIDTH, ylen/WIDTH, 1);
glut.glutStrokeCharacter(GLUT.STROKE_ROMAN, 'Y');
gl.glPopMatrix();
gl.glPushMatrix();
gl.glMaterialfv(GL.GL_FRONT, GL.GL_EMISSION, red,0);
gl.glColor3f(1, 0, 0);
gl.glTranslatef(0, 0, zlen);
gl.glScalef(zlen/WIDTH, zlen/WIDTH, 1);
glut.glutStrokeCharacter(GLUT.STROKE_ROMAN, 'Z');
gl.glPopMatrix();
gl.glMaterialfv(GL.GL_FRONT, GL.GL_EMISSION, black,0);
}