Skip to content

GalaxyCrush/CG-Project

Repository files navigation

Solar System WebGL Project

Overview

This collaborative project, developed for the Graphic Computing subject, aimed to create a realistic Solar System using WebGL. The team, consisting of three colleagues, successfully achieved a perfect score by implementing various features and controls to enhance the user experience.

Interface

The interface provides a range of options for users to interact with the Solar System model:

  • Shader Selection: Swap between Shader Phong and Gouraud for different visual effects.
  • Lighting Controls: Adjust the components of diffuse and ambient light.
  • Specular Light: Change the amount of specular light for added realism.
  • Planetary Movement: Toggle translational movement of the planets and asteroids.
  • Model Manipulation: Various controls for exploring and interacting with the model.

Solar System Components

The implemented model includes:

  • The Sun
  • The 8 main planets of the Solar System (Mercury to Neptune)
  • Dwarf planet Pluto
  • Earth's moon, along with moons of Jupiter and Saturn
  • Asteroid belt with 100 asteroids
  • Kuiper belt with 200 asteroids
  • Skybox for the background

Additionally, the scale and rotation periods of the planets adhere to real values.

Camera Controls

Users can navigate the Solar System using the following commands:

  • WASD or Arrows: Move the camera forward, left, backward, and right.
  • Space: Move the camera upward.
  • Ctrl: Move the camera downward.
  • Left Shift: Increase camera speed while pressed.
  • 1: Focus the camera on Earth, toggle off by pressing the key again or moving the camera.
  • 2: Position the camera on the surface of the Sun.
  • Mouse: Rotate the camera horizontally and vertically in first person.
  • o: Toggle orbit lines visibility.

Usage

Open the index.html file or just go to https://galaxycrush.github.io/CG-Project/ to see a live demo .

Note: I recommend using hardware acceleration for a better experience.

About

Projeto de Computação Gráfica

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages