[vtkusers] planar points to get a plane and its normal vector

David Doria daviddoria at gmail.com
Sun Jun 14 07:26:19 EDT 2009


On Sun, Jun 14, 2009 at 6:20 AM, Giancarlo Amati <ilferraresebono at hotmail.it
> wrote:

>  Hello everybody,
>
> I know this is a trivial mathematical problem but I wonder if there's
> anything in VTK that can make it quicker. I have 6 points almost planar in
> the 3D, i wonder if there is any class in VTK which takes at least 3 points
> and compute the plane as well as it's normal vector.
>
> Very kind regards.
> GC
>

I'm not sure why there isn't a function for this (that I can find at
least!). You can find a function that does what you want here:
http://www.vtk.org/pipermail/vtkusers/2004-March/072916.html
or here
http://markmail.org/message/52odxars4ijopqfe#query:fit%20plane%20vtk+page:1+mid:52odxars4ijopqfe+state:results

The idea is that the eigen vector corresponding to the smallest eigen value
of the scatter matrix of the points is the normal of the plane. It seems
like there should be a function somewhere in vtk:
vtkPlane* FitPlane(vtkPoints* Points);

GC, when you get this working how you want it can you post it here and maybe
someone can add it somewhere in vtk?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090614/52799034/attachment.htm>


More information about the vtkusers mailing list