Fan design using Computer Graphics (cpp)
Fan design using Computer Graphics (cpp) //Faisal Porag //Computer Graphics /* স্বপ্নের প্রতিবিম্ব... **/ #include <iostream> #include <stdlib.h> #include <math.h> #include <GL/glut.h> /*Faisal porag Computer science and Engineering department in American International University-Bangladesh*/ //Initializes 3D rendering void initRendering() { glEnable(GL_DEPTH_TEST); } //Called when the window is resized void handleResize(int w, int h) { glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0, (double)w / (double)h, 1.0, 200.0); } float _angle = 0.0; float _cameraAngle = 0.0; float _ang_tri = 0.0; //Draws the 3D scene void drawScene() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); //Switch to the ...