2D Fan design in computer graphics using c++
/**Faisal Porag স্বপ্নের প্রতিবিম্ব... **/ ///Source code : using c++ #include <iostream> #include <stdlib.h> #include <math.h> #include <GL/glut.h> //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 drawing perspective glLoadIdentity(); //Reset the drawing perspective glRotatef(-_cameraAngle, 0.0, 1.0, 0.0); //Rotate the camera glTranslatef(0.0, 0.0, -7.0); //Move forward 5 units glPopMatrix(); //Undo the move to the center of the pentagon glPushMatrix(); //Save the current ...