How do I approximate a function in the form $z = f(x, y)$ of a real-life 3D surface?

142 Views Asked by At

I have a set of points in the form $(x,y,z)$.

I need to estimate a 3D function in the form $z = f(x, y)$ for these points which form a surface that is a circular paraboloid.

The general formula for a circular paraboloid is $z = b(x^2 + y^2)$; $b$ is a constant.

Please HELP!

1

There are 1 best solutions below

2
On

If I understand correctly, you have $n$ data points $(x_k,y_k,z_k)$ and you wish to find a formula

$$ z^*=b(x_k^2+y_k^2)$$

which best fits the data in the least squares sense.

Can we assume that the $(x_k,y_k)$ are distributed uniformly inside a circle about $(0,0)$?

If so, since you have only one free variable, $b$, you can find the value of $b$ which minimizes

\begin{eqnarray} S&=&\sum_{k=1}^n(z^*-z_k)^2\\ &=&\sum_{k=1}^n\left[b\left(x_k^2+y_k^2\right)-z_k\right]^2\\ &=&b^2\sum_{k=1}^n\left(x_k^2+y_k^2\right)^2-2b\sum_{k=1}^n\left(x_k^2+y_k^2\right)z_k+\sum_{k=1}^nz_k^2 \end{eqnarray}

So you want to find $b$ satisfying

$$ \frac{dS}{db}=0 $$

\begin{eqnarray} \frac{dS}{db}&=&2b\sum_{k=1}^n\left(x_k^2+y_k^2\right)^2-2\sum_{k=1}^n\left(x_k^2+y_k^2\right)z_k\\ &=&0 \end{eqnarray}

Therefore

$$ b=\frac{\sum_{k=1}^n\left(x_k^2+y_k^2\right)z_k}{\sum_{k=1}^n\left(x_k^2+y_k^2\right)^2} $$