태양계 모델링 - 태양 지구 달 금성 수성 까지만 ( OpenGL활용 )
#include #include #include static int Day=0,Time=0,Day2=0,Day3=0; void MyDisplay(){ glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(0.1,0.1,0.1,0.1,0.0,0.0,1.0,1.5,0.0); // 전체 모델을 기울임 glColor3f(1.0,0.3,0.3); // 태양의 색 glutWireSphere(0.13,20,16); // 태양을 그려냄 glPushMatrix(); // 태양기준의 좌표계를 스택에 푸시하여 저장 glRotatef((GLfloat) Day,0.0,1.0,0.0); glTranslatef(0.45,0.0,0...