[vtkusers] Best fitting plane....

Malcolm Drummond malcolm at geovision.co.za
Thu Mar 25 05:09:18 EST 2004


Hi Andres

Leo van Ruijven posted a response to a similar question some time back
describing an eigenvector method.

For every x,y,z calculate products xx,xy,xz,yy,yz,zz. Put sums of products
in 3*3 matrix (ie. sxx,sxy,sxz;sxy,syy,syz;sxz,syz,szz) which now represents
an ellipsoid bounding your point-set. Use vtkMath to calculate the
eigenvectors and eigenvalues. The two largest values are in the plane, the
smallest is normal to the plane.

Let me know if you have any problems, I used this method recently and could
dig up some demo code if you need it.

HTH
Malcolm

----- Original Message -----
From: "Andres Barrera" <andresba at hotmail.com>
To: <vtkusers at vtk.org>
Sent: Wednesday, March 24, 2004 7:06 PM
Subject: [vtkusers] Best fitting plane....


> Dear list,
>
> On Fri, 22 Mar 2002 16:39:55 +0100, Anner Adrian wrote:
>
> >>Hello,
> >>
> >>is in vtk a function to find the best fit for a plane with n-points?
> >>I have n-points and now I want place a vtkPlaneSource so that the
> >>distance from the plane to the points is minimal.
>
> I need to solve a similar problem now, but I could find any answer to that
> in the User's List archives.
>
> Is there any defined way of calculating the best fitting plane through a
> series of points in vtk?
>
>    Thank you in advance
>
>          Andres
>
> _________________________________________________________________
> Get reliable access on MSN 9 Dial-up. 3 months for the price of 1!
> (Limited-time offer)
>
http://join.msn.com/?page=dept/dialup&pgmarket=en-us&ST=1/go/onm00200361ave/
direct/01/
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list