World with lat n long circles

Hi guys, neebie here newly working in the world of 3d graphics. I’m looking to make the first step in creating a globe. I am looking to first off create a wire frame of the globe With the only lines representing sections of lat and longs…essentially just layered circles, no triangles. I’ll be using this model in a mapped coordinate system later, and wanna be sure I get off on the right track. Any help, comments, or suggestions would be appreciated. Thanks for you help.

-me

Using the following code and setting polygon mode to wire should do what you want…

        private void drawMapedSphere ( GL gl )
        {
            int n =64;
            
            double x = 0;
            double y = 0;
            double z = 0;
            
            double phi1, phi2, theta;
            
            for( int i = 0; i < n; i++ )
            {
                phi1 = i * PI / n;
                phi2 = (i + 1) * PI / n;
                
                gl.glBegin ( GL_QUAD_STRIP );
                for( int j = 0; j <= n; j++ )
                {
                    theta = j * 2 * PI / n;
                    
                    x = sin ( theta ) * sin ( phi1 );
                    y = cos ( phi1 );
                    z = cos ( theta ) * sin ( phi1 );
                    
                    gl.glNormal3d ( x,y,z );
                    gl.glTexCoord2d ( 0.5 + (double)j / n, (double)i / n );
                    gl.glVertex3d ( x,y,z );
                    
                    x = sin ( theta ) * sin ( phi2 );
                    y = cos ( phi2 );
                    z = cos ( theta ) * sin ( phi2 );
                    
                    gl.glNormal3d ( x,y,z );
                    gl.glTexCoord2d ( 0.5 + (double)j / n, (i+1.0) / n );
                    gl.glVertex3d ( x,y,z );
                }
                gl.glEnd ();
            }
        }