Skip to content

Latest commit

 

History

History
85 lines (72 loc) · 1.85 KB

README.md

File metadata and controls

85 lines (72 loc) · 1.85 KB
      _______  _______  _______  __   __ 
     |  _    ||       ||   _   ||  |_|  |
     | |_|   ||    ___||  |_|  ||       |
     |       ||   |___ |       ||       |
     |  _   | |    ___||       ||       |
     | |_|   ||   |___ |   _   || ||_|| |
     |_______||_______||__| |__||_|   |_|

-- beam, a toy raytracer implemented in Nim --

beam is a raytracer implemented in Nim

Sample image

The implementation follows closely the book The Ray Tracer Challenge by Jamis Buck.

Implementation:

  • Math:
    • Tuples
    • Points
    • 2D and 3D vectors
    • Matrices
    • Transformations
      • Translation
      • Scaling
      • Rotation
      • Shearing
      • Transformation chaining
    • Intersections
      • Hits
  • Scene:
    • World
    • Camera
    • Entities:
      • Spheres
      • Planes
  • Lighting:
    • Phong Lighting
    • Shadows
    • Point lights
  • Patterns:
    • Base patterns
    • Stripe
    • Gradient
    • Checker
    • Ring
    • Extra:
      • Radial
      • Nested
      • Blended
      • Perturbed
  • Output formats:
    • PPM
  • Tests:
    • Chapter 1
    • Chapter 2
    • Chapter 3
    • Chapter 4
    • Chapter 5
    • Chapter 6
    • Chapter 7
    • Chapter 8
    • Chapter 9
    • Chapter 10
    • Chapter 11
    • Chapter 12
    • Chapter 13
    • Chapter 14
    • Chapter 15
    • Chapter 16

Build

$ nimble build -d:danger -mm:arc

Run tests

$ nimble tests

Run the raytracer

$ nimble run -d:danger -mm:arc