Skip to content

Latest commit

 

History

History
47 lines (40 loc) · 2.17 KB

README.md

File metadata and controls

47 lines (40 loc) · 2.17 KB
						MINIRT

DESCRIPTION: this project from 42's school is a basic ray tracing progam. You can create a file with the extention '.rt' where you will set some objects in a scene. Basic Scenes are available in ressources/scenes

Launch: miniRT [scene_path]
	compiled and tested on MAC-OS


A	set the ambiance ligth of the scene (this argument is requisite in the configuration file).
	this option requires a ratio in range [0.0,1.0] and RGB color in [0,255]
	example:	A 	0.2 	255,255,255
C	set the camera position in the scene (this argument is requisite in the configuration file).
	this option requires coordonates x,y,z, an orientational vector [-1,1] and a FOV [0,180]
	example:	C 	-50.0,0,20 	0,0,1 	70
L	set the light in the scene (this argument is requisite in the configuration file). 
	this option requires coordonates x,y,z, a brightness ratio [0.0,1.0] and (optional) a RGB color.
	example:	 L 	-40.0,50.0,0.0	0.6 10,0,255

OBJECTS:
sp	set a sphere in the scene. this option requires coordonates x,y,z, the sphere diameter and its color.
	example:	sp	0.0,0.0,20.6	12.6 10,0,255
pl	set a plan in the scene, this option requires coordonates x,y,z, an orientational vector [-1,1] for 
	each axes and a RGB color.
	example:	pl 	0.0,0.0,-10.0 	0.0,1.0,0.0 	0,0,225
cy	set a cylindere in the scene, this option requires coordonates x,y,z, a directional  vector [-1,1] for
	each axes, its diameter, its height and a RGB color.
	example:	cy 	50.0,0.0,20.6 	0.0,0.0,1.0 	14.2 	21.42 	10,0,255
co	set a cone in the scene. Same options as cylinder.

BONUS FLAGS:
-t	set the transformation of an object. when you use this flag you don't need to set the coordonates and 
	vectors of the object anymore. you will set the translation, the rotation and the scaling instead.
	example:	co	-t 	0,0,-4 	90,0,0 	1,2,3 255,255,255
	-t <translation> <rotation> <scale>
-T[f,c,  i, n]	set the texture of the object.
	-Tf <color>		flat unique color
	-Tc <color1> <color2>	checker with two color
	-Ti <image_path>	texture from img (png)
	-Tn			texture generated from object normals
-m	set material for phong model.
	-m <reflection_ration> <shininess>
-b	set the bump map.
	-b <image_path>