Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matboivin/raytracer
School project: A simple ray tracer in C
https://github.com/matboivin/raytracer
42 42born2code minirt
Last synced: 7 days ago
JSON representation
School project: A simple ray tracer in C
- Host: GitHub
- URL: https://github.com/matboivin/raytracer
- Owner: matboivin
- License: wtfpl
- Created: 2020-07-20T11:09:38.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-11T14:38:40.000Z (over 3 years ago)
- Last Synced: 2024-08-01T10:21:09.828Z (3 months ago)
- Topics: 42, 42born2code, minirt
- Language: C
- Homepage:
- Size: 5.32 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- 42-resources - raytracer
README
# miniRT
`miniRT` is an individual school project at [42 Paris](https://www.42.fr) campus.
42 is a private, non-profit and tuition-free Computer Science school based on peer-to-peer learning and hands-on projects.
All programs written in C follow 42 style guideline.> This project is an introduction to the beautiful world of Ray tracing. Once completed you will be able to render simple Computer-Generated-Images and you will never be afraid of implementing mathematical formulas again.
The goal of your program is to generate images using the Raytracing protocol. Those computer generated images will each represent a scene, as seen from a specific angle and position, defined by simple geometric objects, and each with its own lighting system.
`dragon.rt` file generated using [mesh converter](https://github.com/matboivin/miniRT-mesh-converter).
### Disclaimer
This project is a school assignment. It was done for **learning purposes** and is thus **not intended for production**.
Don't copy. Learn.I gathered all the resources that were helpful in the `doc` directory. You can check it out but don't copy and paste code without understanding how it works.
## Requirements
This program was developed on Debian Linux. It runs on Debian and Ubuntu.
- make
- gcc
- libxext-dev and libbsd-dev packages (see `install` rule in Makefile)### Dependencies
- [MinilibX for Linux](https://github.com/42Paris/minilibx-linux)
- [libft](https://github.com/matboivin/libft)
- [minimath](https://github.com/matboivin/minimath)## Installation
1. Clone the repository and its dependencies:
```console
$ git clone --recursive https://github.com/matboivin/miniRT
```2. Change it to your working directory and run:
```console
$ make install && make
```## Usage
This program takes as a first argument a [scene description file](doc/scene_file.md) ending with the `.rt` extension. Example files are provided in the [scenes](scenes) directory.
```console
$ ./miniRT [--save]optional arguments:
--save save the rendered image in bmp format
```* Press `ESC` key to exit the program.
* Press space bar to switch view point in case of several cameras.### Examples
```console
$ ./miniRT scenes/room.rt
$ ./miniRT scenes/scene.rt
```
## Acknowledgements
School project done at [42 Paris](https://www.42.fr).
Many thanks to [0auBSQ](https://github.com/0auBSQ) for contributing!
## License
See `LICENSE` for more information.