Lazarus

Announcements => Third party => Topic started by: avra on September 12, 2019, 11:31:05 am

Title: Interpolate1234D - Fast multidimensional interpolation library
Post by: avra on September 12, 2019, 11:31:05 am
Interpolate1234D

Interpolate1234D (https://bitbucket.org/avra/interpolate1234d/) is fast 1D, 2D, 3D and 4D linear interpolation (https://en.wikipedia.org/wiki/Linear_interpolation) library with O(1) time complexity. It is made in an "old school" procedural programming with pointer arithmetic without using any of the modern pascal language features, because it's primary goal is to run on a very simple low power microcontroller which calculates hundreds of fuzzy logic fuzzifications, operations and defuzzifications every second in a real time control loop. The only way to achieve this goal was to avoid intensive calculations and read values for interpolation directly from precalculated lookup tables which can have up to 4 dimensions - depending on the number of numerical inputs. That was the main reason for creation of this library. My effort to visually present how multidimensional linear interpolation works can be found here (https://bitbucket.org/avra/interpolate1234d/downloads/Multidimensional%20Linear%20Interpolation%20Explained.xls). As an interesting side effect this library also handles linear extrapolation (https://en.wikipedia.org/wiki/Linear_extrapolation) when input values are outside of the table range.


Info and Download

https://bitbucket.org/avra/interpolate1234d


License

Interpolate1234D is released under commercial friendly Mozilla Public License 2.0 (MPL-2.0) (https://www.mozilla.org/MPL/2.0). Here is license explained in plain English (https://www.tldrlegal.com/l/mpl-2.0).


Author

Made by Avra (Zeljko Avramovic). Big thanks go to Gernot Hoffmann for his paper Multidimensional Linear Interpolation (https://bitbucket.org/avra/interpolate1234d/downloads/Multidimensional%20Linear%20Interpolation%20in%20Pascal.pdf).
Title: Re: Interpolate1234D - Fast multidimensional interpolation library
Post by: avra on January 15, 2020, 02:44:03 pm
v1.2   Added support for dynamic arrays. Added 3D printer bed level mesh map visualization demo.

https://bitbucket.org/avra/interpolate1234d
Title: Re: Interpolate1234D - Fast multidimensional interpolation library
Post by: devEric69 on January 15, 2020, 04:32:38 pm
Interesting also for those who make logic, with fuzzy sets (whether they are SQL or not).
Title: Re: Interpolate1234D - Fast multidimensional interpolation library
Post by: avra on February 24, 2020, 02:28:37 pm
v1.4   Split library into DynamicInterpolation and StaticInterpolation. That way library is much easier to use in embedded devices with limited resources.
TinyPortal © 2005-2018