From mathematical foundations to fully rendered 3D scenes using OpenGL.
This repository contains implementations for COS 344 (Computer Graphics) practical assignments.
The work follows a structured progression:
- Building mathematical foundations
- Rendering 2D scenes
- Expanding into 3D environments
- Enhancing realism with lighting, textures, and translucency
All rendering is done using OpenGL 3.3, with a strong emphasis on understanding the graphics pipeline from first principles.
📄 Spec: :contentReference[oaicite:0]{index=0}
Implement core linear algebra structures and operations used in computer graphics.
- Vector and Matrix classes
- Linear algebra operations:
- Vector addition, dot product, cross product
- Matrix multiplication, transpose, determinant
- Shape abstraction:
- Triangle and Square representations
- Transformation support using matrices
Build the mathematical backbone required for rendering systems.
📄 Spec: :contentReference[oaicite:1]{index=1}
Render a 2D scene using OpenGL and apply transformations.
A miniature golf course layout, including:
- Floor, obstacles, water, ball, and hole
- Multiple shapes (rectangles, triangles, circles)
- Distinct colour mapping for objects
- Object selection via keyboard
- Transformations:
- Translation (WASD)
- Scaling (+ / -)
- Rotation (Q / E)
- Wireframe rendering mode (GL_LINES)
- Real-time interaction
Understand how objects are constructed, transformed, and rendered in 2D space
📄 Spec: :contentReference[oaicite:2]{index=2}
Build a low-polygon 3D scene with hierarchical transformations.
A mini-golf course with a windmill obstacle, featuring:
- Course layout with boundaries and decorations
- A rotating windmill with blades
- Real-world inspired modelling
- 3D shape construction:
- Cuboids, cylinders, cones, prisms
- Scene transformations:
- Rotation (XYZ axes)
- Translation in 3D space
- Animated components:
- Rotating windmill blades with controllable speed
- Wireframe toggle
Transition from 2D to interactive 3D rendering and animation
📄 Spec: :contentReference[oaicite:3]{index=3}
Enhance realism using lighting models and texture mapping
A translucent 3D glass golf ball with:
- Internal light source
- Light projection onto a surface
- Adjustable geometry detail
- Texture mapping:
- Colour maps
- Displacement maps (true geometry changes)
- Alpha maps (transparency)
- Dynamic lighting:
- Point light source inside object
- Material control:
- Colour and transparency adjustments
- Runtime controls:
- Vertex resolution changes
- Light movement
- Scene transformations and reset functionality
Simulate realistic rendering effects using lighting and textures
- All implementations:
- Use C++ (C++11 standard) :contentReference[oaicite:4]{index=4}
- Use OpenGL 3.3 only :contentReference[oaicite:5]{index=5}
- No external high-level libraries for core logic
- All shapes, textures, and objects are manually created
- Focus is on understanding the pipeline, not abstraction
- Linear algebra in graphics
- Transformation matrices
- Rendering pipelines
- Object modelling (2D & 3D)
- Scene interaction
- Lighting models
- Texture mapping techniques
Through these practicals:
- Understand how graphics systems are built from the ground up
- Implement mathematical models for rendering
- Create interactive 2D and 3D environments
- Apply realistic lighting and texture techniques
- Gain hands-on experience with OpenGL rendering
Computer Graphics is where mathematics meets visual reality —
every pixel on the screen is the result of deliberate computation.