Skip to content

This repository contains all the projects I created for my Computer Graphics and Visual Computing Course.

Notifications You must be signed in to change notification settings

jayelcee/Computer-Graphics-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖥️ Computer Graphics Projects

This repository contains a collection of OpenGL-based computer graphics projects developed for the Computer Graphics and Visual Computing course. Each project demonstrates fundamental to advanced rendering concepts using OpenGL, GLUT, and C++.

📄 Lab Overview

Lab 1: Draws two intersecting lines.

image

Lab 2: Displays a hexagon made of colored triangles.

image

Lab 3: Renders a smiley face using immediate mode (glBegin/glEnd) with basic keyboard controls (WASD) and mouse clicks to change eye color.

msrdc  Camasura_Lab3_(Ubuntu)  2025-04-18_15-53-30

Lab 4: Reimplements the smiley face using vertex arrays and glVertexPointer, improving performance and separating geometry data from logic. Maintains same interactivity as Lab 3 with added movement control (arrow keys).

msrdc  Camasura_Lab4_(Ubuntu)  2025-04-18_15-55-47

Lab 5: Optimizes rendering further with Vertex Buffer Objects (VBOs) and Vertex Array Objects (VAOs). Keeps movement and mouse interactivity but introduces modular functions (initVBOs(), createVAO(), etc.) for better structure and scalability.

msrdc  Camasura_Lab5_(Ubuntu)  2025-04-18_15-57-52

Lab 6: Renders a rotating octahedron illuminated by three colored spotlights (red, green, and blue), with interactive 3D camera controls. This program uses smooth camera movement, spotlight directionality, and real-time lighting effects to enhance visual realism.

Control Guide

Camera Movement (Smooth/Continuous):

  • W / S – Move forward / backward
  • A / D – Move left / right
  • Q / E – Move down / up

Other Controls:

  • ESC – Exit the program

Visual Features:

  • Rotating Octahedron – Automatically spins horizontally
  • Three Spotlights – Red, green, and blue lights with directional focus and realistic attenuation
  • Smooth Camera Control – Movement is velocity-based for fluid transitions in 3D space

msrdc  Camasura_Lab6_(Ubuntu)  2025-04-18_16-12-57

🎮 Final Project

Renders a dynamic 3D solar scene featuring Earth, Moon, background stars, and an Among Us character using OpenGL. Implements object transformations (translation, rotation, scaling), VBOs, and full-screen rendering. Designed for interactive visualization with animated motion, real-time controls, and a stylized space environment.

Control Guide

  • W/A/S/D – Move the Among Us character
  • Mouse Scroll – Scale the Earth object
  • Left Mouse Button – Rotate the Moon
  • ESC – Exit the program

In collaboration with Shawn Aaron Quirante

Video Demo: https://youtu.be/HNalhw2L8Jk

🛠️ Getting Started

1. Clone the Repository

git clone https://github.com/jayelcee/Computer-Graphics-Projects.git
cd Computer-Graphics-Projects

2. Install Dependencies

Linux (Ubuntu/Debian)

sudo apt-get update
sudo apt-get install g++ freeglut3-dev libglew-dev

macOS

  • Install Xcode Command Line Tools:
    xcode-select --install
  • Or use Homebrew:
    brew install glew

Windows

  • Install FreeGLUT
  • Configure your compiler (e.g., MinGW or MSVC) to include FreeGLUT and GLEW headers and libraries.

⚙️ Compilation & Execution

  1. From the root directory of the repository, compile any .cpp file. For example, to compile and run CG_lab1.cpp:

    g++ CG_lab1.cpp -o CG_lab1 -lGL -lGLU -lglut
    ./CG_lab1
    ./CG_lab2
    ./CG_lab3
    ./CG_lab4
    g++ CG_lab5.cpp -o CG_lab5 -lGL -lGLU -lglut -lGLEW
    ./CG_lab5
  2. Replace CG_lab1.cpp with the filename of the project you want to run.

👉 Final Project:

g++ CG_project.cpp -o CG_project -lGL -lGLU -lglut -lGLEW
./CG_project

📜 License

This project is open-source and available under the MIT License.

About

This repository contains all the projects I created for my Computer Graphics and Visual Computing Course.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages