donotturnoff

Raytracer JS

Introduction

This is a basic raytracer written in JavaScript. It currently supports spheres and tori, though it can be extended to other shapes too. Lighting is done using the Phong shading model, and surfaces can be reflective. The camera is fixed at the origin. Included here is a demo showing two interlinked tori in two different images with different maximum recursion depths. Allow time for it to render!

Files

Screenshots

To do

Related projects