Solar System In openGl

Solar System In openGl

How to make circle(at center) in OpenGL

xx=radius
for(i=0;i<=360;i++)
        {
            glBegin(GL_POINTS);
            ang=i*((3.14*2)/360);
            x=xx * cos(ang);
            y=xx * sin(ang);
            glVertex2f(x,y);
            glEnd();
         }

Program:-

Output:-
 


Comments