A repository for all OpenGL code... being updated gradually
- Created my first OGL program.
- Learned to create a window, and set a window size and position.
- Learned to set the background display color.
- Learned to implement sound files in my program
- Learned about OpenGL Geometric Primitives.
- Created my virtual world using GL_POLYGON, GL_TRIANGLES, and GL_LINE_STRIP.
- I used glColor3f to fill the color of the Triangle and Polygon.
- Created a FatPaintBrush program with a reshape, keyboard, mouse, motion handler, and Viewport.
- Successfully ran DinoPolyLine File which takes a .txt/.dat file and displays a Dino.
- Completed DinoTilling using a for loop creates a new Viewport for each iteration and creates a dino.
- Completed Dino invert Tilling using nested for loops.
- Completed Dino Zoom in and out using Keys, which zooms in on the up arrow key zooms out on the down arrow key, and reposts the display with updated value.
- Completed viewport panning in which the viewport is variable and can be increased and decreased using a mouse or keyboard
- Created a parametrized Regular polygon and n-gon using lineTo and moveTo functions.
- Implemented the code for Arc.
- Implemented the code for Rose Curves.
- Implemented the code for Rosette (Example from the book).
- Created a circle using equation: x + rcosØ, y + rsinØ
- Implemented and created an Arrow using moveTo and lineTo functions.
- Figure 3.27 rosette
- Implemented and completed Figure 2.44 menu (attached menu with right mouse button)
- Created my Paint Program:
- Learned to render/write text on screen
- Used vector array to draw dots, clicking the left mouse button will create dots and the right mouse clears the dots (push and pop in array)
- Created a shape class that is inherited by different shapes like Triangles, circles, pentagons, cylinder
- Used keyboard handler to render and delete shapes on the screen, on pressing a key a shape is drawn and deleted. (push and pop in vector array)
- Implemented Point2 class and Turtle Graphics:
- Example 3.5.2 (motifs)
- Practice Exercises-> 3.5.1 – 3.5.6 (motifs and meanders)
- Practice Exercises-> 3.5.7 – 3.5.9 (Polyspirals)
- Created a Mario 2D game, learned about RGBApixmap, Enum datatype, reading a bmp file, setting a chromakey, Special keyboard functions and how to move a bmp on screen using keyboard interactions.
- Canvas Class implementation with some more classes including Point2, IntRect, and RealRect.
- Created my own 3 functions drawSun(), drawStar(), and drawSmiley() using Canvas Class.
- Spider game lab:
- Physics engine to check collision between spider & bullet.
- Bounce back logic of the spider if it reaches the wall of the window.
- Object modeling Bullet.
- Use of the gettime() function to determine the speed of the spider at each point second.
- Usage of 2D transformations
- Usage of push & pop matrix for transformations of windmill blade
- Timer Function which increments the value of the angle so the windmill keeps rotating.
- Plane (object) landing using the Timer function.
- Using Transformations to create flakes and a star.
- Dino transformations.
- Modeling and animating a gear wheel.
- Drawing a symmetric object (snowflake) using a Turtle.
- Model a 2D car using transformations and animate it using the Timer function, attached menu to start, restart & exit the program.
- Example of a 2D robot for hierarchical modeling, by using these solutions:
- Independent / Non – hierarchical
- Dependent / Hierarchical.
- Example 5.6.2: A scene composed of wireframe objects.
- Example 5.6.3. A 3D scene rendered with shading.