Skip to content

var-pi/simple-interpolator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is it?

This package provides functionality for bilinear interpolation. The current capabilities are the following:


How to install it?

pip install simple-interpolator

Find out more here.


How to use it?

The library simple_interpolator provides a file interpolator encapsulating a class Interpolator.

from simple_interpolator.interpolator import Interpolator

Interpolator class

members desription
graph() three-dimentional graph of the interpolant
colormap() two-dimentional colormap of the interpolant
show() renders all of the visualisations
add_coordinate() provide an additional coordiante
add_coordinates() provide a list of additional coordinates
set_rank() set a max power of a variable
auto_rank() fit the data perfectly automatically
data a list of the provided coordinates
f an interpolant function
print_f() mathematical representation of the interpolant

Example

from simple_interpolator.interpolator import Interpolator

i = Interpolator([(2,-5,2),(6,-3,4),(3,-6,4),(-4,3,5),(5,-4,8),(3,7,-5)])

print("Provided coordinates:\n\n\t", i.data, "\n")

print("An interpolant:\n\n",end='\t')
i.print_f(1)

i.graph()
i.colormap()

i.show()

Output:

Provided coordinates:

         [(2, 5, -4), (6, 3, -4), (3, -6, 4), (4, -3, 5), (5, -4, 8)]

Generated interpolant:

        9.7+1.5x+0.4x²-0.1y-0.1xy-0.1x²y+0.2y²

The spacial visualisation is provided as a rotatable 3D object. The picture presented here is just an illustration.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages