8000 GitHub - statvej/miniRT
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

statvej/miniRT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniRT

42 Ciriculum project MiniRT stands for "Mini Ray-Tracer", which is a program that creates an image by mathemnaticaly simulating rays of light going through every pixel using MLX graphic library. (Grade 125/100)

This technic alows to render realistic looking pictures. This program can generate regular Phong model difusion, recursive reflection AND refraction, calculating multi spot and colored lights, custom skydomes, regular and bump textures. All of this with objects like Sphere, Plane, Cylinder, Triangle and Hyperboloid And here are some examples :

Examples

Screen Shot 2023-01-27 at 7 40 44 PM

Screen Shot 2023-01-27 at 7 53 45 PM

Screen Shot 2023-01-30 at 3 46 43 PM

Screen Shot 2023-01-27 at 7 39 54 PM

Screen Shot 2023-01-22 at 10 27 21 PM

Screen Shot 2023-01-22 at 7 58 26 PM

Screen Shot 2023-01-30 at 3 56 09 PM

Usage

Install by cloning the repo

git clone https://github.com/statvej/miniRT.git

Then compile by using make And run the program with scene input as command line argument

./miniRT scenes/reflective_corner.rt

It's posible to create your own scenes or change pre-made ones. Here are options for objets

Abbriviation Name Properties
c camera Center, direction, fov
A ambient light intensity, collor
l light position, intensity color
sp sphere position, diameter, color, material
pl plane position, surface normal, color, material
cy cylinder position, tube axis direction, diameter, length, color, material
tr trinagle point1, point2, point3, color, material
hy hyperboloid origin point, axis orientation, semi-major axis parameteres, radius, color, material

Materials are stored as numbers, here are explanation of what those numbers mean:

Number Type
1 Regular surface
2 Reflective surface
3 Refractive (only with spheres)
4 Earth texture no bump (only with spheres)
5 Mirror
6 Space texture (only with spheres)
7 Checkered surface
8 Sun texture (only with spheres)
9 Moon texture no bump (only with spheres)
10 Mars texture no bump (only with spheres)
11 Mercury texture no bump (only with spheres)
12 Venus texture no bump (only with spheres)
13 Jupiter texture no bump (only with spheres)
14 Earth texture WITH bumps (only with spheres)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 84.5%
  • Objective-C 14.7%
  • Makefile 0.8%
0