Request: Fit a plane, line etc to a cloud of 3d-points

themadmathematician shared this idea 9 years ago
Under Consideration

Being able to work with trivariate data seems as a natural expansion when GeoGebra goes 3D. Creating lists of 3d-points from values in the spreadsheet would be a good start, combined with linear algorithms for fitting pointclouds to either a plane or a 3d-line. Obviously, linear combinations and general fits would be most welcome too. I actually ran in to this problem just now and the nearest thing that will do it seems to be Matlab (and I guess Mathematica, though I can't get Wolfram Alpha to do it). I came across papers on formal solutions in linear algebra by googling "fit plane to 3d pointcloud" but I can't be bothered to do it manually.

Comments (2)

photo
1

In 5.0.290.0 (to be released this weekend) the following should work:

Fit[{A,B,C,D},{x,y,0x+1}]


The first argument is a list of 3D points, the second list must contain functions or multivariable functions (so constant function needs to be written as 0x+1 explicitly). This allows you to do a general linear regression in 3D. FitPoly[] is easy to code so it may come later, FitExp / FitSin / ... are not so likely to be implemented.


Also list of 3D points from spreadsheet was implemented several weeks ago.

photo
1

Manual method to fit line/plane in 3D (using SVD)

https://www.geogebra.org/m/hmTzuJ2d

© 2022 International GeoGebra Institute