Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

matt77hias/BusinessCardRayTracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

BusinessCardRayTracer

About

The Business Card Ray Tracer is originally written by Andrew Kensler and reverse engineered by Fabien Sanglard. I modified the code to include my own initials MM (Matthias Moulin) instead of aek (Andrew Kensler) or Fab (Fabien Sanglard), and changed the red tile color to a green tile color. This unfortunately does not result in an "elite" size of 1337 characters, but rather 1360 or 1350 (if you use a basic green color).

Initial Generation

  1. Create the 9x 19-bit Big-endian binary masks representing the initials. (The current camera settings maximally support a 9x19 regular grid of spheres.
  2. Convert the 9x 19-bit Big-endian binary masks to a decimal format.
                    =                                                   = 0
                    =                                                   = 0
11     11 11     11 = 2^18 + 2^17 + 2^11 + 2^10 + 2^8 + 2^7 + 2^1 + 2^0 = 396675
1 1   1 1 1 1   1 1 = 2^18 + 2^16 + 2^12 + 2^10 + 2^8 + 2^6 + 2^2 + 2^0 = 333125
1 1   1 1 1 1   1 1 = 2^18 + 2^16 + 2^12 + 2^10 + 2^8 + 2^6 + 2^2 + 2^0 = 333125
1  1 1  1 1  1 1  1 = 2^18 + 2^15 + 2^13 + 2^10 + 2^8 + 2^5 + 2^3 + 2^0 = 304425
1  1 1  1 1  1 1  1 = 2^18 + 2^15 + 2^13 + 2^10 + 2^8 + 2^5 + 2^3 + 2^0 = 304425
1   1   1 1   1   1 = 2^18 + 2^14 + 2^10 + 2^8 + 2^4 + 2^0              = 279825
1   1   1 1   1   1 = 2^18 + 2^14 + 2^10 + 2^8 + 2^4 + 2^0              = 279825
  1. Add the decimal values in reverse order to the G array describing the world/scene.
i G[]={279825,279825,304425,304425,333125,333125,396675,0,0};

Use

  1. rt.exe > mm.ppm

About

Business Card Ray Tracer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages