MINIRT START 2023.05.31.
Table of Contents
- scenes/universe.rt
- scenes/test1.rt
- scenes/snowman.rt
- scenes/among.rt
$ git clone https://github.com/minishell-yecseo/miniRT
$ cd miniRT
$ make bonus
$ ./miniRT_bonus <TEST.rt>
miniRT_bonus takes only one *.rt file as an input. So, you must write an *.rt file according to the guide below. If the file has error, the program should notice you the number of line of the first error.
- Viewport & Camera with Rays
- Objects
- Lights
For all rays, We can represent a point on a ray with camera's origin, ray direction, and t that decide length of ray. In a mathmatical expression,
- O = camera's origin == ray's origin
- v̂ = ray's normalized 3dimension direction vector
- t = length from Origin
P = O + tv̂
reference : http://www.illusioncatalyst.com/notes.php
BONUS .rt FORMAT GUIDE
- A, C are same with mandatory part.
- L
- You can make lights more than one up to 1000.
- color can be specified.
- Others (Objects)
- Every objects's line start with two common tokens, <object_type>, <surface_type, options>
[ object types ]
1) sp : sphere
2) pl : plane
3) cy : cylinder
4) co : cone
5) ci : circle
[ details ]
[ Sphere ]
available token numbers : 5, 6
sp surface center diameter
[ Plane ]
available token numbers : 5, 6
pl surface center norm
[ Cylinder ]
available token number : 7, 8
cy surface bottom_center axis diameter height
[ Cone ]
available token number : 7, 8
co surface bottom_center axis diameter height
[ Circle ]
available token number : 7, 8
ci surface center axis diameter width
[ surface ] Surface consists of type and options.
[ types ]
1) color : takes one option : <color vector>
2) checker : takes two options : <color vector> <color vector>
3) texture : takes two options : "texture.xpm" "bumpmap.xpm"
[ examples ]
1) sp texture images/test.xpm images/test2.xpm 0,0,0 5
2) pl color 255,25,255 0,0,0 0,1.0,0
3) co checker 0,0,0 255,255,255 0,0,0 -0,2,1,0 10 20






