• Create Account

### #Actualmax343

Posted 21 February 2013 - 06:52 AM

I haven't tested it, but maybe you can do this:

Your plane equations are: Ni*x-Di, with Ni normalized row vectors, Di are scalars, and x is a column vector.
Now minimize the sum of squared distances with respect to x: S=sum[(Ni*x-Di)^2]
Obtain: x=((sum[Ni^T*Ni])^+) * sum[Di*Ni^T]
I'm almost sure that the pseudo-inverse is not required (and you can take the regular inverse), because this reminds me a lot of SVD. However, this is just a hunch.

EDIT: Yup, the matrix should be invertible for any closed polyhedrons. No need for pseudo-inverse.

### #3max343

Posted 21 February 2013 - 06:20 AM

I haven't tested it, but maybe you can do this:

Your plane equations are: Ni*x-Di, with Ni normalized row vectors, Di are scalars, and x is a column vector.
Now minimize the sum of squared distances with respect to x: S=sum[(Ni*x-Di)^2]
Obtain: x=((sum[Ni^T*Ni])^+) * sum[Di*Ni^T]
I'm almost sure that the pseudo-inverse is not required (and you can take the regular inverse), because this reminds me a lot of SVD. However, this is just a hunch.

### #2max343

Posted 21 February 2013 - 06:02 AM

I haven't tested it, but maybe you can do this:

Your plane equations are: Ni*x-Di, with Ni row vectors, Di are scalars, and x is a column vector.
Now minimize the sum of squared distances with respect to x: S=sum[(Ni*x-Di)^2]
Obtain: x=((sum[Ni^T*Ni])^+) * sum[Di*Ni^T]
I'm almost sure that the pseudo-inverse is not required (and you can take the regular inverse), because this reminds me a lot of SVD. However, this is just a hunch.

### #1max343

Posted 21 February 2013 - 06:02 AM

I haven't tested it, but maybe you can do this:<br /><br />Your plane equations are: Ni*x-Di, with Ni row vectors, Di are scalars, and x is a column vector.<br />Now minimize the sum of squared distances with respect to x: S=sum[(Ni*x-Di)^2]<br />Obtain: x=((sum[Ni^T*Ni])^+) * sum[Di*Ni^T]<br />I'm almost sure that the pseudo-inverse is not required (and you can take the regular inverse), because this reminds me a lot of SVD. However, this is just a hunch.

PARTNERS