February 2019
Intermediate to advanced
292 pages
6h 55m
English
A torus is a ring or donut shape, like this:

They make really neat, versatile primitives, but they’re a bit more advanced than the primitives you’ve implemented so far. Spheres, cylinders, and cones are called quadric surfaces, which means they can be described by second-degree equations (those where no variable is raised to a power higher than 2). A torus, though, is a quartic surface, with variables raised to the fourth power. This means you need a quartic equation solver to find the intersection between a torus and a ray.
But that just means you get to dig deeper than you have before, right? If you don’t already have access ...
Read now
Unlock full access