Sign in to follow this  
kaarigar

Least square fitting a plane question

Recommended Posts

I have a set of 3d points in space. These points belong to a roof of a building. Using Jama Matrix package (a Java library), I have calculated a least square fitting plane for these points by solving A * X = B, which gives me X. Now I want to project all the points to this plane - how can I do that? With my limited knowledge, I know to define a plane I need normal and also a point on a plane before I can project any point to it. Can someone point me to right direction? Thanks!

Share this post


Link to post
Share on other sites
[quote name='rajesh_nest' timestamp='1318305747' post='4871322']
Take dot product between the normal of the plane and points computed from least square solver.
[/quote]
So I take it that the X calculated by the solver is the normal of the plane? Should it be normalized before using it in dot product? The dot product of a point with the normal would give a scalar - how is it to be used? Thanks!

Share this post


Link to post
Share on other sites
I assume by "projection" you mean the closest point P on the plane ax+by+cz+d=0 to a point A?

The line between P and A has the direction vector [a, b, c]

Now solve for the intersection between a line and a plane.

[url="http://paulbourke.net/geometry/planeline/"]http://paulbourke.net/geometry/planeline/[/url] (Look at solution 2, solve for u, plug u into the line equation)

Share this post


Link to post
Share on other sites
[quote name='jameszhao00' timestamp='1318313177' post='4871348']
I assume by "projection" you mean the closest point P on the plane ax+by+cz+d=0 to a point A?

The line between P and A has the direction vector [a, b, c]
[/quote]
Is the [a,b,c] obtained by the matrix solving of A * X = B?

Share this post


Link to post
Share on other sites
[quote name='kaarigar' timestamp='1318367693' post='4871612']
[quote name='jameszhao00' timestamp='1318313177' post='4871348']
I assume by "projection" you mean the closest point P on the plane ax+by+cz+d=0 to a point A?

The line between P and A has the direction vector [a, b, c]
[/quote]
Is the [a,b,c] obtained by the matrix solving of A * X = B?
[/quote]


How is the plane represented in your least square solution?

Share this post


Link to post
Share on other sites
[quote name='jameszhao00' timestamp='1318369453' post='4871620']
How is the plane represented in your least square solution?
[/quote]
I don't have a plane - as I have mentioned in my original post, I have a set of points and a fitted plane has been matrix solved using A * X = B. That has given me a column vector X which is the representative of the plane's A, B and C coefficients. The main problems is how I can project the original points to this plane. Being not a mathematician, this is a very complex problem for me to solve - any help is appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this