plot_2d_sdf

command
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2022 License: BSD-2-Clause Imports: 8 Imported by: 0

README

plot-2d-sdf

This example plots a two-dimensional signed distance field for any simple 2D shape (encoded as an image). The signed distance field is plotted using a color code, so that blue is positive and red is negative; intensity is used to indicate magnitude.

This is intended to help visualize how the signed distance field behaves inside of a shape: where it changes derivatives, sign, magnitude, etc. It also helps visualize local minima and saddle points in the SDF landscape.

Output

Here is an example output, which takes in the heart image on the left, and produces the distance field on the right:

Example rendering

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL