I´m trying do draw a 3D globe, but don´t succeed.
A circle is beeing drawn, but then I would like to draw circels each with 1 grade angle increase since the last drawn circle. What do I have to modify in my code?
final float DEG2RAD = (float)3.14159/180;
float grade = 0.0f;
void drawCircle(float radius)
{
gl.glBegin(GL.GL_LINE_LOOP);
for (int i=0; i < 360; i++)
{
for(int y=0; y<360; y++)
{
float degInRad = y*DEG2RAD;
gl.glVertex2f(((float)Math.cos(degInRad)*radius)+grade, (float)Math.sin(degInRad)*radius);
grade++;
}
}
gl.glEnd();
}