The Earth–Moon–Sun Dance

By Zihan Zhao

This Showcase enhances Assignment 6 with a complete real-time, procedural Earth–Moon–Sun system, integrating multiple shader modules and animation logic.

1. main.cpp – Animation, Camera, and Shader Integration

Real-time orbital mechanics for Earth and Moon “Follow Earth” camera with custom lookAt implementation Keyboard controls:

2. planet.fs – Full Procedural Planet Renderer

Procedural Sun with animated convection (Perlin noise) Earth layers:

3. model.glsl – Orbital Transform System

Transformation hierarchy:

4. bump_height.glsl – Terrain / Height Modeling

Multi-layer Earth height: oceans → coasts → land → mountains → snow Procedural lunar crater approximation Height drives shading, cloud shadows, biome transitions

Acknowledgements

CSC317 Assignment 6 starter code libigl (icosahedron mesh utilities) GLFW (window / input) Eigen (math library) Ken Perlin (noise reference) GLAD (OpenGL loader)