Skip to content

kraptor/beam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

      _______  _______  _______  __   __ 
     |  _    ||       ||   _   ||  |_|  |
     | |_|   ||    ___||  |_|  ||       |
     |       ||   |___ |       ||       |
     |  _   | |    ___||       ||       |
     | |_|   ||   |___ |   _   || ||_|| |
     |_______||_______||__| |__||_|   |_|

-- 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

About

A toy raytracer written in Nim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages