Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tjensen42/42-minirt
This 42 project is an introduction to the beautiful world of Raytracing.
https://github.com/tjensen42/42-minirt
42cursus minirt raytracer raytracing
Last synced: about 6 hours ago
JSON representation
This 42 project is an introduction to the beautiful world of Raytracing.
- Host: GitHub
- URL: https://github.com/tjensen42/42-minirt
- Owner: tjensen42
- Created: 2022-04-02T10:21:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-19T11:44:25.000Z (almost 2 years ago)
- Last Synced: 2023-03-05T19:09:07.049Z (over 1 year ago)
- Topics: 42cursus, minirt, raytracer, raytracing
- Language: C
- Homepage:
- Size: 301 MB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 42-miniRT
This 42 project is an introduction to the beautiful world of Raytracing.
It is one of the group projects in the 42 core curriculum.
Done by: [hepple42](https://github.com/hepple42) & [tjensen42](https://github.com/tjensen42)Working on this project, we have noticed more and more interesting optical effects in everyday life and were constantly thinking about possible implementation in our RayTracer. Once the basic principle was implemented, it was fun to add more and more objects and functionalities. We were especially excited about implementing relatively fundamental physical laws in code.
An excellent source on raytracing which helped us a lot is [Ray Tracing in One Weekend series of books](https://raytracing.github.io/) by Peter Shirley. It is a really detailed step-by-step guide for implementing a path-tracer in C++.
## How to use it
The only supported and tested operating systems are ```macOS``` and ```Ubuntu 20.04```.
For ```Ubuntu``` it is necessary to install the GLFW library first:
```
sudo apt-get update && \
sudo apt-get install libglfw3 && \
sudo apt-get install libglfw3-dev
```Compile and run miniRT in 3 simple steps:
1. ```git clone --depth 1 https://github.com/tjensen42/42-miniRT miniRT```
2. ```cd miniRT && make```
3. ```./miniRT scenes/template.rt```
## Scenes
Example: [Template](scenes/template.rt)
| Identifier | Description | Identifier | Description
| :--- | :--- | :--- | :--- |
| ```R``` | Resolution | ```ls``` | Light sphere |
| ```S``` | Sampling specifications |```ld``` | Light disc |
| ```B``` | Background |```lr``` | Light rectangle |
| ```A``` | Ambient light |```tx``` | Texture |
| ```C``` | Camera |```pl``` | Plane |
| | | ```sp``` | Sphere |
| | | ```cy``` | Cylinder |
| | | ```tb``` | Tube |
| | | ```di``` | Disc |
| | | ```rt``` | Rectangle |
| | | ```cu``` | Cuboid |## Samples
*This 42 project is written in C and in accordance to the 42 school norm.
> #### Sample restrictions:
> - All variables have to be declared and aligned at the top of each function
> - Each function can not have more then 25 lines
> - Projects should be created with allowed std functions otherwise it is cheating