#transformation #geometry #graphics

mlsnd

Moving Least Squares deformations in N Dimensions

2 releases

0.1.1 Apr 3, 2023
0.1.0 Apr 3, 2023

#778 in Images

22 downloads per month

MIT license

17KB
294 lines

mlsnd: Moving Least Squares in N Dimensions

An implementation of the moving least squares point deformation algorithm (Schaefer 2006).

Heavily inspired by the existing moving-least-squares crate. Here is how they compare:

Feature moving-least-squares mlsnd
Number types f32 only Generic over f32, f64
Dimensionality 2D only Generic over N dimensions
Speed ~20% faster Slower
Algorithm support Affine, rigid, similarity Affine only
Dependencies Fewer More (mainly nalgebra)
Results (2D f32) Same (near enough) Same (near enough)

The motivating paper only suggests a dimensionality-agnostic implementation for the affine case, although the other cases may be tractable for someone who is better than me at linear algebra.

Dependencies

~3.5MB
~74K SLoC