+ 7
[SOLVED] How can I create a smooth plane/surface from a set of points?
Say the plane is represented by a two dimensional array whose elements contain the height of each vertex. How can I initialize it with a smaller array and smoothen out the values in between? Solution: https://code.sololearn.com/WWS3bPM44Y0T/?ref=app
5 odpowiedzi
+ 5
The smoothening part is called "interpolation". There are multiple ways to fill in the gaps (bilinear being the simplest) but your image looks like bicubic interpolation to me.
You might want to solve the simpler problem of interpolating a 1D function first (like, plotting a graph with x and y). 1D linear interpolation is just drawing a straight line between two neighboring points, 1D cubic interpolation requires some more maths.
After that, 2D should be easy.
+ 5
ChillPill🥇pro🥇 averaging the points makes the surface rugged - bicubic interpolation seems to work best .
+ 1
idk...
ChillPill🥇pro🥇 ?!