Download

Help with bicubic interpolation

I have a grid of hexagons built of 6 triangles (point in middle of hexagon). I’m deforming the hexagon lattice using some procedural noise. This mesh acts as a guide for other meshes to be spawned on. When I add those vertices in I want to bicubic interpolate them based upon their location within the closest hexagon. I found cubic interpolation in the Fmath library. It takes 2 points and 2 tangents, and an alpha for the distance the point is along it. This doesn’t add up to me. I’m not very familiar with interpolation, I’ve used some of the 2d interpolations UE4 provides, like easyin, exponentialInOut, etc…When I picture how bicubic interpolation works I would imagine you would need three points. In my case Any border vert of the hexagon in question, the center vert, and finally the adjacent vert from the first. Then I would be trying to fit a circle to touch all three of those verts. This is where I start to get lost. How do I fit a circle onto three points? Also, I keep seeing tangents mentioned as these lines that poke out from the points, and are needed in order to compute the interpolation. How does a tangent help fit a circle onto those three points?

So the last bit was for 2D implementation, but how would I make this 3D. Would I just do the other 2 straight lines across the hexagon and then average together?

Thisimplementation looks promising but I think it’s for a grid of squares (4 squares). It looks like it takes 4, 4 point containers. I’m not sure yet which points those would be. Perhaps the 4 corners of each square? I’m wondering how I could apply this to a hexagon. If you look at a hexagon tilted it kind of resembles a square grid, with two corners missing.