Hi,
Is there any package in Julia for interpolating a 3d grid of datapoints (a typical cloud of non-regularly spaced datapoints)? I need it for plotting purposes only and I do not have a specific algorithm in mind.
Thanks!
Hi,
Is there any package in Julia for interpolating a 3d grid of datapoints (a typical cloud of non-regularly spaced datapoints)? I need it for plotting purposes only and I do not have a specific algorithm in mind.
Thanks!
There are several packages, e.g. https://github.com/SciML/Surrogates.jl, https://github.com/markmbaum/BasicInterpolators.jl, https://github.com/RJDennis/ChebyshevApprox.jl, https://github.com/stevengj/FastChebInterp.jl … most of these do some kind of fit, however, and do not guarantee the fit will go exactly through your original data points (unless they lie at special points, e.g. Chebyshev nodes)
If you want exact interpolation from an arbitrary set of points in 3d, one typically first forms a Delaunay triangularization (tetrahedralization in 3d) of your points, and then does (e.g.) linear interpolation within each simplex (tetrahedron). There are Julia packages for Delaunay triangulation, but I don’t know whether the whole interpolation pipeline is available. You could always call scipy.interpolate.LinearNDInterpolator
from Julia via PyCall, however.
(What is the source of your data points?)
How irregular and what kind of interpolation did you have in mind?
Thank you both. I am not a domain expert and thus I really have no preferences on the interpolation method to use for this graphical representation. The (x,y) coordinates are drawn at random (uniformly) and the z coordinate is a function of x and y.
Could you show how the input data looks like or just share a representative portion of it?
Besides what stevengj mentioned above, you may also be interested in
https://github.com/eljungsk/ScatteredInterpolation.jl
Thank you, it looks quite intuitive. I will definitely take a look. I have also seen several applications of regression trees for spatial interpolation, so I might try that as well and see what happens. Unfortunately I cannot share the data in this instance.
I managed to get the results that I wanted gridding the data via bagging (bootstrap aggregating) and plotting it with PGFPlotsX as a filled contour. I will post some code on my GitHub page for those who are interested!