hamza-ezzahiry / RT

RayTracer with miniLibX Using C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RT

All Contributors

RT

Ray Tracing Using C

About

RT is a project i made it during my student years at 1337 School khouribga (one of 42 Network), This project is the first step to create a Raytracing program, for you to finally be able to render computer-generated images.

Project Contents :

  • 01. Libft : C library regrouping usual functions that we’ll be allowed to use in all your other projects.
  • 02. minilibx
  • 03. Ray Tracing files + Parsing
  • 03. scenes

ID of evey Shape (for parsing) :

id Shape
1 sphere
2 plane
3 cylinder
4 cone
5 cube
6 Torus (soon)

Parsing file format

Under the construction

Camere

camera <position> <look at> <field of view> 

light

light <position> <intensity> <color> 

Sphere

sphere <origin> <raduis> <color> <translation> <rotation>

Plane

plane <origin> <color> <norme> <translation> <rotation> 

Cylindre

cylindre <origin> <raduis> <height> <axis> <color> <translation> <rotation>

Cone

cone <origin> <raduis> <height> <color> <axis vector> <translation> <rotation>

Resources :

Getting Started

Compiling

Run the following commands:

  • To compile
    • make
  • To remove objects:
    • make clean
  • To remove objects and binary file (program):
    • make fclean
  • To re-compile:
    • make re

Executing

To run the program:

./rt [scene.xml]

Screenshots

Screen1

Screen2

keys keyboards (Minilibx)

I want to contribute to the project! But how?

  • Fork this repository
  • Clone your repository forked
  • Contribute
  • Push
  • Create a pull request in this repository
  • Wait the merged !
  • Be happy :)

About

RayTracer with miniLibX Using C

License:MIT License


Languages

Language:C 77.6%Language:Objective-C 13.8%Language:Roff 5.8%Language:Makefile 2.8%