Solid sweeps along line segments

Alec Jacobson

February 07, 2015

weblog/

I made a nice realization today that the boolean code I've been working on can also be used to compute "solid sweeps" of meshes along line segments: the Minkowski sum of a polyhedron and a line segment.

Check out linear_sweep.m in gptoolbox. It works in 2D (using Triangle and the winding number to classify the boundary of the swept region):

octopus swept area

and in 3D:

knight swept volume

the 3D version is currently only robust if the sweep vector goes outside the bounding box of the input shape. In those cases, I'm using a technique analogous to my robust booleans and it works quite well. But if the sweep vector is small, I'm resorting to using TetGen and computing winding numbers: TetGen will often fail. Hopefully this limitation is not for long, since I have a clear idea how to handle small vectors. Just need to code it up.

Update: The 3D version is now robust, too.