Data is a path in space. I have 3D location data (x, y, z) and the time at which the location point was recorded.
The x, y, and z coordinates are the location points of something traveling through 3D space. The time values are the time (starting from 0) that is recorded at each point.
xyz time(s) 0.1 2.2 3.3 0 2.4 2.4 4.2 0.3 4.5 2.5 1.8 0.6
I will eventually skip some entries. (this is known and accepted as true) And the data stream will continue with a different time interval:
xyz time(s) 0.1 2.2 3.3 0 2.4 2.4 4.2 0.3 //missing x,y,z data point at time 0.6 //missing x,y,z data point at time 0.9 4.5 2.5 1.8 1.2 ... ...
Please note that the data has been simplified. My goal is to interpolate the missing 3D points at known missed moments. I have studied various interpolation methods, but I'm not quite sure which interpolation method is suitable for my problem.
1) Can someone briefly explain the problem? My math is extremely rusty, and I’m not sure how to describe it correctly, which forces me to investigate interpolation methods that may be incorrectly selected.
2) Update 1 . Triccubic interpolation should not be applied here, since I do not work with a grid in three-dimensional space. I work with a trajectory. I found an implementation of Tricubic Interpolation in Apache math3 communities, however I'm not sure if this is what I need. If you look at the arguments that it takes, it takes a double matrix [] [] [] fval, which I'm not sure about.
3) If not suitable for Java, the best tool to interpolate this data?
Update 2 - Specter Solution Question
In your editing, you give the following advice regarding "matching the first conclusions of the sovlocal points":
let's define our t=<-2,+2> and try such a control point (it doesn’t really matter how it affects only the magnitude of the coefficients and including -1,0,1 will greatly simplify the equations):
p(-2) = p0 p(-1) = p1 p( 0) = p2 p( 1) = p3
Now suppose we want to interpolate all the points on the interval t=<0,1> , so that all the points are between p2 and p3 . And we want a continuous piecewise curve, so the first derivations at the sovlocal points must coincide. We have another control point on the left side, so the second output may also be the same:
p'(0) = 0.5*((p3-p2)+(p2-p1)) = 0.5*(p3-p1) p'(1) = 0.5*((p4-p3)+(p3-p2)) = 0.5*(p4-p2) p''(0)= 0.5*(((p2-p1)-(p1-p0))+((p4-p3)-(p3-p2))) = 0.5*((p2-2*p1+p0)+(p4-2*p3+p2)) = 0.5*(p0+p4)-p1+p2-p3
I hope I did not make a stupid mistake in the second derivation. Now simply replace p(t) with the known control points and form a system of equations and calculate a0,a1,a2,a3,a4 algebraically from p0,p1,p2,p3,p4 .
1) What do you mean by joint points ?
2) Where
p'(0) = 0.5*((p3-p2)+(p2-p1)) = 0.5*(p3-p1) p'(1) = 0.5*((p4-p3)+(p3-p2)) = 0.5*(p4-p2)
have come? Are they in any way related to p(0) = p2 and p(1) = p3 ? Can they be anyone?
It can be written as p'(0) = 0.5*((p(3)-p(0)) + (p(0)-p(-1)) correct? I don’t understand why this is done. Or even why it is can do
2b) A similar question for
p''(0)= 0.5*(((p2-p1)-(p1-p0))+((p4-p3)-(p3-p2))) = 0.5*((p2-2*p1+p0)+(p4-2*p3+p2)) = 0.5*(p0+p4)-p1+p2-p3
but I suppose that clarifying question 2) will ease my ambiguity for 2b), because I have no idea where the equation came from.
What follows is pretty straightforward, then it's just a system of equations