This project simulates a 3D model of the solar system using ray tracing techniques, allowing for realistic rendering of planets, moons, and other celestial bodies. The simulation includes representations of orbits and lighting effects.
Alternatively, you can create your own map using any supported objects!
- Easy Scene Creation: Simply specify object names and details on the map to render the desired scene.
- Support for Various Objects: In addition to celestial bodies, renders desired objects when specified on the map.
- Time Interval and Flow Adjustment: Allows observation of celestial movements by adjusting the flow of time.
- Viewpoint Switching: Instantly switch to viewpoints that allow you to observe each celestial body or a top-down view.
- Free Movement: Move freely in any direction within the space environment.
- Phong lighting: Realistic lighting effects including shadows cast by objects.
- Raytracing Techniques: Uses ray tracing for high-quality rendering of reflections, refractions, and shadows.
- Anti-Aliasing Support: Provides smoother and more natural rendering of images.
To compile and run this program, you'll need:
- minilibX
- A C/C++ compiler (e.g., GCC)
- Make (optional, for easier compilation)
Follow these steps to set up and run the IRC server on your local machine:
-
Clone the repository:
git clone https://github.com/Hyun-Soon/RayTraceSolar.git cd RayTraceSolar
-
Build the project:
make
-
Run the program:
./miniRT <arg1> arg1 : map file path(e.g., ./maps/solar_system.rt)
You can create your own map with the supported objects below. Map's extension must be .rt
and each arguments should be seperated by space.
Keyword | Meaning | Arguments |
---|---|---|
A |
Ambient | brightness ratio, color |
C |
Camera | position, direction, FOV |
L |
Light | position, brightness ratio, color |
cb |
CheckerBoard | position, normal vector, pattern direction, color |
pl |
Plane | position, normal vector, color |
dk |
Disk | position, normal vector, diameter, color |
sp |
Sphere | position, diameter, color, [texturemap], [bumpmap] |
cn |
Cone | position, normal vector, radius, height, color |
cy |
Cylinder | position, normal vector, diameter, height, color |
lb |
LightBulb | position, diameter, color, [texturemap], [bumpmap] |
star |
Star | name, axis, radius, color, [texturemap], [bumpmap] |
planet |
Planet | name, primary star(planet) name, axis, radius, orbit radius, period, color, [texturemap], [bumpmap] |
You can use these names for star and planets.
Star : SUN
Planet : MERC
,VENUS
, EARTH
, MARS
, JUPITER
, SATURN
, MOON
0
~9
keys below.
Key | Meaning |
---|---|
W, A, S, D |
Control camera movement within the environment |
E, Q |
Move up, down vertically |
Arrow Keys |
Move the viewpoint up, down, left, and right |
[, ] |
Time flows into the past/future in time interval |
F |
Adjust the time interval(day - week - month - year cycle) |
0 |
Top view |
1 |
Set the camera to point from Earth towards the Sun |
2 |
Set the camera to point from Sun towards the Mercury |
3 |
Set the camera to point from Sun towards the Venus |
4 |
Set the camera to point from Sun towards the Earth |
5 |
Set the camera to point from Sun towards the Mars |
6 |
Set the camera to point from Sun towards the Jupiter |
7 |
Set the camera to point from Sun towards the Saturn |
9 |
Set the camera to point from Earth towards the Moon |
SPACE |
Turn on/off anti-aliasing |
ESC |
Destroy window |
임현순 | 서동현 | 김유승 | 김성민 |