Isosurface Analysis
Surface analysis in crater.rs
is based on the properties of scalar fields and their derivatives. Given a scalar field , we can compute various surface properties.
Gradient Computation
The gradient of a scalar field at origins is the vector of partial derivatives:
In crater.rs
, gradients are computed using automatic differentiation through the Burn framework.
Gradient Properties
- The gradient points in the direction of steepest increase of the scalar field
- The magnitude of the gradient indicates the rate of change
- At points on an isosurface , the gradient is normal to the surface
Surface Normals
For origins on an isosurface , the unit normal vector is:
Surface Curvature
Surface curvature measures how much the surface deviates from being flat. For a surface defined by , the mean curvature is:
Where is the Hessian matrix of second derivatives.