Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

This 42 project is an introduction to the beautiful world of Raytracing.

NotificationsYou must be signed in to change notification settings

tjensen42/42-miniRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42-logo

This 42 project is an introduction to the beautiful world of Raytracing.It is one of the group projects in the 42 core curriculum.
Done by:hepple42 &tjensen42

Working on this project, we have noticed more and more interesting optical effects in everyday life and were constantly thinking about possible implementation in our RayTracer. Once the basic principle was implemented, it was fun to add more and more objects and functionalities. We were especially excited about implementing relatively fundamental physical laws in code.

An excellent source on raytracing which helped us a lot isRay Tracing in One Weekend series of books by Peter Shirley. It is a really detailed step-by-step guide for implementing a path-tracer in C++.


How to use it

The only supported and tested operating systems aremacOS andUbuntu 20.04.

ForUbuntu it is necessary to install the GLFW library first:

sudo apt-get update && \sudo apt-get install libglfw3 && \sudo apt-get install libglfw3-dev

Compile and run miniRT in 3 simple steps:

  1. git clone --depth 1 https://github.com/tjensen42/42-miniRT miniRT
  2. cd miniRT && make
  3. ./miniRT scenes/template.rt

Scenes

Example:Template

IdentifierDescriptionIdentifierDescription
RResolutionlsLight sphere
SSampling specificationsldLight disc
BBackgroundlrLight rectangle
AAmbient lighttxTexture
CCameraplPlane
spSphere
cyCylinder
tbTube
diDisc
rtRectangle
cuCuboid

Samples

Screen Shot 2022-05-27 at 12 25 43 PM

777

135

6000

template

Screen Shot 2022-05-31 at 10 50 14 AM

Screen Shot 2022-06-07 at 2 56 40 PM

600

random-42-color

rgb-color



*This 42 project is written in C and in accordance to the 42 school norm.

Sample restrictions:

  • All variables have to be declared and aligned at the top of each function
  • Each function can not have more then 25 lines
  • Projects should be created with allowed std functions otherwise it is cheating

About

This 42 project is an introduction to the beautiful world of Raytracing.

Topics

Resources

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp