Skip to content

Hyun-Soon/RayTraceSolar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪐 Solar System Simulation using Raytracing

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.

🎥 Orbit of the Moon

🎥 Solar System Simulation

IMG_0023

Alternatively, you can create your own map using any supported objects!

christmas

🚀 Features

  • 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.

📜 Prerequisites

⚠️ MacOS Only

To compile and run this program, you'll need:

  • minilibX
  • A C/C++ compiler (e.g., GCC)
  • Make (optional, for easier compilation)

💻 Installation

Follow these steps to set up and run the IRC server on your local machine:

  1. Clone the repository:

    git clone https://github.com/Hyun-Soon/RayTraceSolar.git
    cd RayTraceSolar
  2. Build the project:

    make
  3. Run the program:

    ./miniRT <arg1>
    
    arg1 : map file path(e.g., ./maps/solar_system.rt)

⚒️ Custom Maps

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.

Object List

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]

⚠️ If you don't want to use the optional argument on star and planet objects, you must specify 'none'

You can use these names for star and planets.

Star : SUN

Planet : MERC,VENUS, EARTH, MARS, JUPITER, SATURN, MOON

⚠️ Specify star and planet's name in the map if you want to use 0~9 keys below.

🎮 Controls

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

🙌 Collaborator

임현순 서동현 김유승 김성민
임현순 서동현 김유승 김성민

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published