Distance Transform

Distance function visualized through a gyroid volume. Solid red and blue are uncalculated inside/outside areas. Gradients are distance from the surface. Otherwise I thought it just made a cool animation.

This forms the core of applying surface effects at a specific distance. You could hollow a model > some distance from the surface or you could apply a pattern up to some distance on the surface to make it more interesting. Check out DistanceTransformExact.java for the code. We’re working on more optimized versions as well but this class forms the basis for unit testing other approximations. When we get the library level done then we’ll expose this at ShapeJS.


This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s