Computer Graphics Project "Planet Orbit" Source Code with Glut OpenGL
Hello there !!! This time I will post a project in the past. It is about rotation and applied to make earth orbital with moon and sun. As reminder, for you who haven’t install glut you can download it in here and follow the instruction I uploaded too. You can download this orbital project in here too. The image above is the result of orbital project. Here is the source code for this project. #include <windows.h> #include <stdlib.h> #include <GL/glut.h> #include <math.h> void myinit() { glClearColor(0.0, 0.0, 0.0, 1.0); glColor3f(1.0, 0.0, 0.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-400.0, 400.0, -400.0, 400.0,-400.0,400.0); glMatrixMode(GL_MODELVIEW); glShadeModel(GL_FLAT); glEnable(GL_DEPTH_TEST); } float putaransatu, putarandua = 0; typedef struct{ float x,y; } point2D_t; void drawDot(int x,int y){ glBegin(GL_POINTS); glVertex2i(x,y); glEnd(); } /*void bintang(void) { static int tick=0; static...