Proposal for Ray Tracing Sunset SimulatorAugust 2020
It is sometimes said that scientists are unromantic, that their passion to figure out robs the world of beauty and mystery. But is it not stirring to understand how the world actually works — that white light is made of colors, that color is the way we perceive the wavelengths of light, that transparent air reflects light, that in so doing it discriminates among the waves, and that the sky is blue for the same reason that the sunset is red? It does no harm to the romance of the sunset to know a little bit about it.
― Carl Sagan, Pale Blue Dot: A Vision of the Human Future in Space
For over many thousands of years, every single day, us humans get to see the nature’s finest artwork drawn on the vast canvas that we call sky. As Carl Sagan said, even though we may know how the sunset works, that does not decrease the appreciation for the beauty of it.
From the course website:
This course provides a broad introduction to the fundamentals of computer graphics. […] [with] an emphasis on mathematical and geometric aspects of graphics, and the ability to write complete 3D graphics programs.
In both Carl Sagan and this course’s final project spirit, I wanted to understand and learn the mechanics of the sunset and write a graphics program that demonstrates it.
Description of the challenge
This project will attempt to implement some of the mechanics of the sunset, accelerate the rendering with ray tracing, and (hopefully) present the simulator live on a webpage using WebGL.
The main challenge would be to do a particle based sunset simulation, where the rays from the sun interacts with the atmosphere and change their wavelength composition.
Main mechanics of a sunset
This website (link) has a good article that describes why the color of the sun changes throughout the day.
Goals and Deliverables
The goals directly related to the concepts we learned in class and expansion of it is noted with
- Feasibility research
- Create a simple plane with camera view of the horizon with a direct spherical light source that will be our sun
*Make the renderer use ray tracing
- Direct illumination (the sun)
- Global illumination (the atmosphere, and the plane)
*Add atmospheric refraction
- [Idea] Particle based simulation? i.e. the rays lose certain wavelength as they interact with the atmosphere
At this point, I hope to have recreated the changes in the color of the sun, as well as the “green flash". It would be a good mesaure of the performance of the simulation!
From this point the below goals are the “stretch” goals that would be amazing if also implemented. These are the goals that I would continue to pursue even after the conclusion of the project for this class.
- Improve the simple plane to have more interesting elements: e.g. water and reflections?
- Add atmosphere conditions
- Add geographical accuracy. i.e. the sun will set in correct direction based on the location of the camera
- Use 3D maps to draw surroundings and add shadow effects. It would be cool to see the Bay view of the sunset!
- Movements within the scene
- Green flash: http://en.wikipedia.org/wiki/Green_flash
- Mechanics of a sunset: https://scienceblogs.com/startswithabang/2013/02/13/the-physics-of-sunsets
- Blue Skies and Red Sunsets: https://www.physicsclassroom.com/class/light/Lesson-2/Blue-Skies-and-Red-Sunsets
- A Green Light at Sunset (1887!): https://www.nature.com/articles/035391b0
- Sunset /Colors - Wikipedia: https://en.wikipedia.org/wiki/Sunset#Colors
Tags: cs184 cal