0
$\begingroup$

I am given $N$ plane equations in the $ax+by+cz+d=0$ form, meaning we have their normals $a, b, c: ||(a, b, c)|| = 1$ and distances from the origin ($d$). In general, the planes are similar, so the coefficients do not differ very much. I do not have any points on the given planes, but I guess they can be sampled.

I need to find an equation of the plane which is closest to them all, i.e represents the cluster of the planes in the best way. To put it differently, I need to merge all the planes into one. I am not sure what metric to use to measure plane fitness.

I've tried taking average of all plane coefficients, which produces a good result of the normal, but the last coefficient ($d$) seems wrong, the resulting plane has a small offset from the cluster.

  • 0
    How do you know the resulting plane has an offset from the cluster? What does that mean?2017-02-01
  • 0
    @DavidK I visualize both the resulting and initial planes. The resulting one always appears slightly above or below the rest.2017-02-02
  • 0
    Your "avarage equation" may not be normalized (i.e. $||(a, b, c)|| \neq 1$), so the "avarage $d$" has no interpretation as a distance from the origin, I think. If you check your result in a non-strict way, you may have an impression the last coefficient is wrong.2017-02-02
  • 0
    @KamilMaciorowski I first calculate all four resulting coefficient as averages of respective coefficients of source planes. Next, I divide each of the four coefficients by the length of the vector created by the first three coefficients (a, b, c). Is that correct?2017-02-02
  • 0
    I don't know if taking average is a correct way to merge all the planes into one, but your calculation seems correct in term of an error I thought you might make. Can you edit your question and post some example input data along with your result that is "slightly above or below the rest"?2017-02-02
  • 0
    Unless all the planes are exactly parallel, any new plane you construct must intersect some of them, hence it cannot be completely "above" or "below" all of them. So I suppose you may be looking at a particular place in the plane where it seems to be above or below the others. But I can't be sure that's what you're doing, nor do I know the necessary details to figure out how it works. That's why I asked "how do you know".2017-02-02
  • 0
    Looking over the procedure you described (which should probably be an edit to the question rather than just a comment), I wonder if it would work better if you divided the four coefficients of each individual plane by its individual $\lVert(a,b,c)\rVert$ first, and _then_ averaged them.2017-02-02

1 Answers 1

0

It loos like a minimization problem subjected to constraints. Generate $n$ points from each of the $N$ planes, now you'll have a dataset of $\{(z_i, x_i, y_i)\}_{i=1}^{Nn}$ points in $\mathbb{R}^3$, normalizing the constraint w.r.t to $c\neq0 $, (assume, for now that $c$ is known or estimable apriori) $$||(a,b,c)||=1/c\sqrt{a^2/c^2 + b^2/c^2 +1} =1/c\sqrt{\beta_1^2 + \beta_2^2 +1} =1 \to g(\beta_1, \beta_2)=c.$$
So using Lagrange multiplier, your problem is $$ \min_{\beta \in \mathbb{R}^3} \frac{1}{nN}\sum_{i=1}^{nN}(z_i - \beta_0 - \beta_1x_i - \beta_2y_i)^2 - \lambda (g(\beta_1, \beta_2) - c). $$ It looks like a variation of LASSO regression. So take a look at LASSO and Ridge regressions. It may help.