You could interpolate it with a polynominal positionally but you would need to pass quite a bit of extra data. You would also need to do quite a bit of complicated calculations on the shader probably to hard to explain without taking a lot of time.
You are probably going to need to do it to a mesh as well at least for anything that needs detail.
You are probably going to have to implement something like this either for calculating your mesh vertices or on the shader to displace the pixel or texel positions either way.
If you draw points on a line going up down from A to C in increments of time that range from 0 to 1 with the below function were the X value of B varys off the center of the line (which initially is half way between A and C (a+c)/2 = b) you get a curve. If you then take that b value and keep it on the line and then instead vary the X position of C you would see that you get the bending curvature that your tree desires.
Because this is a 3d function you only need to use the x and y and this function allows for variations in either dimension the z coordinate in all cases can just be set to zero. You can then see this can be used to create vertices that are morphed which you will need for a mesh.
This is a simple version i wrote a long time ago it doesn't do any weighting the basis function is set as is but its simple. A robust version and even this is probably enough to write a whole blog on because its just hard to explain and non trivial.
The technique you are asking about falls under the terminology of polynomials, bezier, nurbs, in general spline surface algorithms.
2) here some code
3) nurbs at the extreme end
/// what it says
public static Vector3 GetPointAtTimeOn2ndDegreePolynominalCurve(Vector3 A, Vector3 B, Vector3 C, float t)
double i = 1.0f - t;
float plotX = 0; float plotY = 0; float plotZ = 0;
plotX = (float)(
A.X * 1 * (i * i) +
B.X * 2 * (i * t) +
C.X * 1 * (t * t)
plotY = (float)(
A.Y * 1 * (i * i) +
B.Y * 2 * (i * t) +
C.Y * 1 * (t * t)
plotZ = (float)(
A.Z * 1 * (i * i) +
B.Z * 2 * (i * t) +
C.Z * 1 * (t * t)
return new Vector3(plotX, plotY, plotZ);
Basically for a quad you need to pass at least a additional 9 control points that are offset around the quad that represent the morphing you want to occur the vertices are found from this.
the function acts as timing function found from the x y positional difference from the start of the quad to the current pixel in relation to the end of the quad that is then used to find the proportional position on the morphed set of 9 points which is then run thru the function to find the current displaced pixel vertice or texel position.
This is basically one order down from a bezier curve basically what you need to do is spline your image.
It wont be very fast either unless you do it with with vertices like a make a animated mesh to do it.
I have a mesh class here that will save some time if you are commited to this.
Mesh Class generates mesh vertices from point arrays