/FTrace

A basic ray tracer built using f#

Primary LanguageF#

FTrace

FTrace is a simple ray tracer written in F# following The Raytracer Challenge, a test driven guide to developing your own ray tracer in whichever language you like.

image

Why FSharp

I have always been interested in learning a functional language but I always found languages like Haskell overly intimidating and difficult to apply to real life situations. But, I had discovered f# recently and found it a good choice thanks to it being part of .Net to finally actually learn a functional language but had no project to apply it to, until I found The Raytracer Challenge which is language agnostic. The book proved tremendously useful as I could now code in f# without following a tutorial made with another paradigm like OOP in mind. The only challenge left was actually learning the language as there are scarce learning resources. The FSharpForFunAndProfit website proved invaluable in this aspect.

Chapters

  • Chapter 1 - Tuples, Points, and Vectors
  • Chapter 2 - Drawing on a Canvas
  • Chapter 3 - Matrices
  • Chapter 4 - Matrix Transformations
  • Chapter 5 - Ray-Sphere Intersections
  • Chapter 6 - Light and Shading
  • Chapter 7 - Making a Scene
  • Chapter 8 - Shadows
  • Chapter 9 - Planes
  • Chapter 10 - Patterns
  • Chapter 11 - Reflection and Refraction
  • Chapter 12 - Cubes
  • Chapter 13 - Cylinders
  • Chapter 14 - Groups
  • Chapter 15 - Triangles
  • Chapter 16 - Constructive Solid Geometry (CSG)