I wanted to use Monotone cubic interpolation, but the site only provide explanation for 2D case. How can I extend it to 3D?
-
$\begingroup$ Do you mean that you have a set of 3D control points, C0, C1...Cn, and, I assume, some rotation matrix, P, such that, (P.Ci) [x] is strictly increasing, as are (P.Ci) [y] and (P.Ci) [z] ? $\endgroup$– Simon FCommented Apr 24, 2017 at 11:56
-
$\begingroup$ No, i mean in 3D a point is defined by (x, y, z) instead of (x, y). $\endgroup$– Bla...Commented Apr 24, 2017 at 12:04
-
$\begingroup$ Your question is ambiguous as you don't specify monotonic in relation to what in 3D? $\endgroup$– JarkkoLCommented Apr 25, 2017 at 13:10
-
$\begingroup$ @JarkkoL You need to check the link that I provided. $\endgroup$– Bla...Commented Apr 25, 2017 at 15:27
-
$\begingroup$ It doesn't disambiguate how you want the function to be monotonic in 3D. If you want the function to be monotonic along y-axis like in the 2D case, it's trivial extension, but if you want it to be monotonic along each axis, it's different. So which is it? Please clarify your question. $\endgroup$– JarkkoLCommented Apr 25, 2017 at 15:58
1 Answer
Ok, monotonic interpolation depends on what you are monotonic about. For a simple 1D function interpolation monotonicity is easy to define. But for a 2D and 3D dataset its not so self evident what the situation would be.
First you could interpolate along a independent variable t in which case your monotonicity is most probably in relation to t. This is the same as interpolating each direction separately.
Second you could interpolate along one of the axes, so that your interpolant becomes a function of position on that axis. Reducing a 2D case into a 1D case and a 3D case to two separate 2D cases.
Third you could interpolate on some other spatial variable.
So you see the question is a bit open ended and is hard to say for sure.
-
1$\begingroup$ In the link provided above it's Monotone cubic Hermite interpolation. The idea is to maintain the direction of tangent vectors. Any idea how to extend it for 3D case? $\endgroup$– Bla...Commented Jul 5, 2017 at 6:40
-
$\begingroup$ @Bla... So you dont actually want a monotone curve at all then? As you ar not defining what your going to be monotone about. Try a catmul-rom spline. $\endgroup$– joojaaCommented Jul 5, 2017 at 6:52