fiesta.disperse.Filament.get_points#
- Filament.get_points(s, unit=None)[source]#
Function to sample any point on the filament spine.
A filament function is one that parameterizes the 1D filament curve in 3D space, defined as \(\mathbf{f}(s) = (x,y,z)\) where \(s \in [0,1]\) is the normalized distance of a point along the filament spine and \((x,y,z)\) is the position vector of that point in space.
Since DisPerSE only outputs a discrete set of sampling points, fitting \(\mathbf{f}(s)\) allows one to sample the filament continuously or as finely as required. In this implementation, the function is a cubic B-spline fit using
scipy.interpolate.splprep
, with zero-smoothing to ensure it passes through input points.- Variables:
- Returns:
points (
Quantity
) – Array of 3d position vectors corresponding to the points at the given normalized distances \(s\) along the filament.