Skip to content

A single-file ray tracer for C++ for use with TAMU CSCE 435 parallel processing

License

Notifications You must be signed in to change notification settings

mld2443/LeanRay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

LeanRay

After discussing this, it was decided that I would rewrite it in C++, and that it needs to be lean, and that I do not need to spend a lot of time documenting the code and explaining how everything works in comments and docs. As part of it being lean, I chose to leave everything in one admittedly long file, (an honored C/C++ tradition).

1920x1080 3000

Running

This program requires libpng to compile. To run the ray tracer, just compile and link the library, then execute it. If you wish to alter the scene, the scene description is at the bottom of the file in the main function.

How does my ray tracer work?

This ray tracer is almost a complete port of my previous Java ray tracer. See that project for more information on how my specific ray tracer works. For more general information on how ray tracing works, Wikipedia has a fairly user-friendly description.

Concerns

  • Since I wrote this with as little documentation as possible, I was certain to name everything very clearly.
  • All parameters are designated at the bottom of the file in the main function. The choice not to have file input or command-line parameters was out of concern for bloating the already long file.
  • I initially had issues with memory leakage, using up several gigabytes of space and rising while tracing. This was solved quickly. The tracing is stable, and I made sure that even the program completion is free of leaks.

About

A single-file ray tracer for C++ for use with TAMU CSCE 435 parallel processing

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages