render.marching_cubes.render_marching_cubes
render.marching_cubes.render_marching_cubes(
sdf,
bounds=(-3, -3, -3),
size=(6, 6, 6),
resolution=50,
ax=None,
color='cyan',
alpha=0.7,
title=None,
figsize=(10, 10),
)Render an SDF by extracting a mesh with marching cubes.
Requires scikit-image.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| sdf | Callable[[Array], Array] | Signed distance function, callable (point: Array[3]) → Array[]. |
required |
| bounds | tuple[float, float, float] | Lower corner (x, y, z) of the evaluation volume. | (-3, -3, -3) |
| size | tuple[float, float, float] | Extent in each dimension (dx, dy, dz). | (6, 6, 6) |
| resolution | int | Grid points per dimension. | 50 |
| ax | plt.Axes | None | Existing 3D axes; creates new figure if None. | None |
| color | str | Mesh face colour. | 'cyan' |
| alpha | float | Mesh transparency. | 0.7 |
| title | str | None | Axes title. | None |
| figsize | tuple[float, float] | Figure size in inches (width, height). | (10, 10) |
Returns
| Name | Type | Description |
|---|---|---|
| plt.Axes | The matplotlib 3D axes. |