Curve fitting 3d closed surface

17 Ansichten (letzte 30 Tage)
Jonathan Lu
Jonathan Lu am 13 Mär. 2018
Kommentiert: Chloe Williams am 12 Aug. 2024
I am trying to curve fit a 3d surface. However, I would like to fit a closed 3d surface onto the points I have in 3d space (ie a sphere, ellisoid, whatever it may be). Is there an easy way to do this with Matlab or any toolbox? I've seen curve fitting toolbox but it doesn't look like it would fit a closed 3d surface since the curve fitting looks polynomial based. Thanks in advance.
  2 Kommentare
AlfonsoFR
AlfonsoFR am 14 Dez. 2020
Bearbeitet: AlfonsoFR am 14 Dez. 2020
Did you ever find a solution to this?
I managed to compute the convex hull of my scattered data cloud which is given in cartesian coordinates, as follows, but then I would like to smooth the edges by using non-negative splines.
figure
P = [X,Y,Z];
[k,vol] = convhulln(P);
% Plot the convex hull.
trisurf(k,P(:,1),P(:,2),P(:,3),'FaceColor','red')
axis equal
axis tight
camlight
lighting phong % gouraud
My [X,Y,Z] were translated into cartesian from Latitude, Longitude and elevation, that is, from Geodetic coordinates into geocentric (ECEF), with the geodetic2ecef() function.
Also tried Surface Reconstruction using Implicit B-Splines, in order to achive a closed surface, but the normalization step to the unit (hyper)cube and the subsequent function calls (IBSL3_3DTRI and IBSLevelSurf) were trickier than they seemed.
Chloe Williams
Chloe Williams am 12 Aug. 2024
Have you found a solution yet? I have a similar problem and I would be glad if I could get your help

Melden Sie sich an, um zu kommentieren.

Antworten (1)

John D'Errico
John D'Errico am 13 Mär. 2018
Not completely trivial. Yes, you can use regression tools to try to estimate the parameters of a conic form etc., but you would need to formulate the model. Then just call backslash.
A problem is this now becomes an errors in variables problem. I.e., you probably would be thinking of minimizing the orthogonal distance of the points onto the surface. A closed surface will have no simple form z(x,y) you can use anyway.
And of course, if you are hoping to be able to fit some more general closed surface (not a simple conic form), this would become correspondingly more difficult.
All of those caveats do not mean it is impossible. For example, you could view things in essentially spherical coordinates, where you generate a model for spherical radius. You could even hope to use my gridfit tool in that form, but it does not allow for the necessary periodic boundary conditions, so it would fail.
So you could do lots of things, depending on your choice of model for the surface and the effort you want to put into a solution.
Sorry. I don't think I've been terribly helpful.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by