How to interpolate R3->R3 (i mean 3D to 3D) function in Matlab? I have found many met
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: How to interpolate R3->R3 (i mean 3D to 3D) function in Matlab? I have found many met

  1. #1
    Join Date
    Jul 2014
    Posts
    3

    How to interpolate R3->R3 (i mean 3D to 3D) function in Matlab? I have found many met

    How to interpolate R3->R3 (i mean 3D to 3D) function in Matlab? I have found many methods to interpolate function R3->R1 (i mean 3D to 1D), but no possible way to accoplish my task. Except for Thin Plate Splines, they worked fine, but I want something new (if it is possible, Kriging).

    "Vq = interp3(X,Y,Z,V,Xq,Yq,Zq) returns... X, Y, and Z contain the coordinates of the sample points. V contains the corresponding function values (SCALAR) at each sample point. Xq, Yq, and Zq contain the coordinates of the query points." This is just what I have mentioned at the beginning. interp3 operate with function (bijection, correspondence) from space with 3 coordinates (3D, triplet) to space with 1 coordinate (1D, scalar). I want to establish and operate with correspondence from 3D to 3D..

    TPS solves such problems. http://www.mathworks.com/matlabcentr...rping-function
    http://www.mathworks.com/matlabcentr...-plate-splines
    I used the first link. The interface is pretty straightforward. I marked: 1. points: old positions of control points; 2. ctrlpoints: new positions of control points; 3. object: source template.

    But I want Kriging now.

    Thank you very much.

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,798

    Re: How to interpolate R3->R3 (i mean 3D to 3D) function in Matlab? I have found many

    you're looking for 3d splines ?

    If yes, you'll need more info than that, you'll need an escape/normal vector on the point as well. ANd probbaly you'll want a 'force' value as well.
    or do you just want a flat transition ?
    or do you want a spline going from point a to b by passing through one or more control points ? (if yes, you may still want a normal/escape at a and b, and forve values at a, b and every intermediary).


    Or are you looking for 'spline planes' (curved planes, the equivalent of a spline in 2d but with an extra D) ?
    if so then TPS might be a fit, but remember those are only curved on 1 dimension.
    if you want a curved surface 'all around' (radial spline) then that's something else entirely.

  3. #3
    Join Date
    Jul 2014
    Posts
    3

    Re: How to interpolate R3->R3 (i mean 3D to 3D) function in Matlab? I have found many

    "you're looking for 3d splines ?"

    Yes, please.

    -

    "if so then TPS might be a fit, but remember those are only curved on 1 dimension."

    I understand your precaution, but no (thin plate splines (TPS) are an interpolation and smoothing technique, the generalisation of splines so that they may be used with two or more dimensions)... There are two links in the first post - I just give corresponding points (they have very different position) and get result.

    -

    Please note that corresponding points might be not PRECISELY fit one to another (even with different scales). There is some criterion function (I need any of it). For example, TPS fits a mapping function f(x) between corresponding point-sets \{y_i\} and \{x_i\} that minimises certain energy function:

    http://en.wikipedia.org/wiki/Thin_plate_spline

  4. #4
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,798

    Re: How to interpolate R3->R3 (i mean 3D to 3D) function in Matlab? I have found many

    ok, so I'm going to assume what you want is curved surfaces in general...

    If yes, then you have
    bezier surfaces
    B-spline surfaces
    nonuniform nonrational B-splines
    nonuniform rational B-splines (NURBS)
    TPS as you already mentioned
    cubit hermite spline


    this isn't easy stuff. Quite a bit of math involved, and you won't easily find 'plug in' code that will fit into your current 3D setup without some pushing and prodding. So you'll need to 'understand' how things work.

    Best I can recommend is getting a decent book on graphics programming. A de facto standard in that field is
    Computer Graphics Principles and Practice by Foley, Van Dam, Feiner and Hughes.
    There's a free chapter available as PDF , unfortunatley not the one you want.

    The 3rd edition has just very recently been released (24 years after the 2nd edition). It's pricey, but it's a "dense" book with a lot of the low level stuff you want to know when you're in this field.

  5. #5
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,798

    Re: How to interpolate R3->R3 (i mean 3D to 3D) function in Matlab? I have found many

    alternatively, depending on needs, you might be able to pick up a 2nd edition "really cheap" as some stores will be dumping their 2nd edition copies.

  6. #6
    Join Date
    Jul 2014
    Posts
    3

    Re: How to interpolate R3->R3 (i mean 3D to 3D) function in Matlab? I have found many

    “nonuniform nonrational B-splines”
    No information about it.

    “nonuniform rational B-splines (NURBS)”
    It operates with (approximates) functions Rn->R1 (if (there is a point at (x1k, x2k, …, xnk), then f(x1k, x2k, …, xnk)=1, otherwise f(x1k, x2k, …, xnk)=0).

    “B-spline surfaces”
    Partial case of NURBS.

    “Bezier surfaces”
    Partial case of NURBS.

    “cubic hermite spline” (its generalization to three dimensions is called Tricubic interpolation)
    Equivalent to Bezier surfaces.

    “TPS as you already mentioned”
    Great Rn->Rn extrapolation/approximation tool.

    There are some smaller overlapping kinds of splines (T-Spline, B-Spline) with same problem.

    -

    I had great use of article:
    http://en.wikipedia.org/wiki/Multivariate_interpolation
    However, no method for my needs. Namely:

    “Nearest-neighbor interpolation”
    Another Rn->R1 extrapolation/approximation tool. No good extrapolation for my case.

    “Triangulated irregular network-based natural neighbor”
    Another Rn->R1 extrapolation/approximation tool. No good extrapolation for my case.

    “Triangulated irregular network-based linear interpolation (a type of piecewise linear function)”
    Another Rn->R1 extrapolation/approximation tool.

    “Inverse distance weighting”
    Another Rn->R1 extrapolation/approximation tool.

    “Kriging”
    Another Rn->R1 extrapolation/approximation tool.

    “Radial basis function”
    Another Rn->R1 extrapolation/approximation tool (by the way, mixing RBF and Kriging in the form of parametrization coordinates by distance between points done by me was unsuccessful).

    “Thin plate spline”
    Great Rn->Rn extrapolation/approximation tool.

    “Polyharmonic spline (the thin-plate-spline is a special case of a polyharmonic spline)”
    Too close to TPS.

    “Least-squares spline”
    Another Rn->R1 extrapolation/approximation tool (called spap2 in Matlab).

    -

    It is rather simple Math, as for me. I need to solve my task…
    Last edited by Kosarar; Today at 09:04 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center