Recent

Author Topic: Interpolate1234D - Fast multidimensional interpolation library  (Read 243 times)

avra

  • Hero Member
  • *****
  • Posts: 1712
    • Additional info
Interpolate1234D - Fast multidimensional interpolation library
« on: September 12, 2019, 11:31:05 am »
Interpolate1234D

Interpolate1234D is fast 1D, 2D, 3D and 4D 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. As an interesting side effect this library also handles 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). Here is license explained in plain English.


Author

Made by Avra (Zeljko Avramovic). Big thanks go to Gernot Hoffmann for his paper Multidimensional Linear Interpolation.
« Last Edit: September 12, 2019, 02:28:16 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib