Skip to content

hamza-ezzahiry/rtv1_team

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTv1

All Contributors

Gatsby

Ray Tracing Version 1.0 (RTv1)

About

RTv1 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

Parsing file format

camera -50,0,20 0,0,0 70 
light -40,0,30 0.7 255,255,255 
sphere 0,0,20 20 255,0,0 0,0,0 0,0,0
plane 0,0,0 0,0,1 255,0,225 0,0,0 0,0,0
cylinder 50,0,20.6 14.2 21.42 0,1,0 10,0,255 0,0,0 0,0,0
cone 0,0,-10 3 10 255,150,50  0.3,-1,0.8 0,0,0 0,0,0

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:

./rtv1 [scene]

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

My first RayTracer with miniLibX Using C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published