V.4

Ray Tracing a Swept Sphere

Leipelt Andreas,     Mathematisches Seminar der Universität Hamburg Hamburg, Germany. E-mail address: leipelt@GEOMAT.math.uni-hamburg.de

This gem presents the basic algorithms required for ray tracing the swept surface (Hanrahan 1989) generated by sweeping a sphere along a path. These surfaces look like wound tubes with varying thickness, resembling plant stems or exhaust pipes.

Introduction

For ray tracing this interesting modeling primitive, one needs to solve the following problems:

• Compute the intersections with a ray.

• Determine the axis-aligned bounding box.

• Decide if a point is inside or not.

• Compute the surface normal at an intersection point.

In order to ease the computation, it is assumed ...

Get Graphics Gems V (IBM Version) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.