Method Efficient Computing normal of surface R^3 A idea efficiency computational the problem solve the normals of surface in point $ P = (x_i,y_i,z_i) $.
My thought to solution in way will be compute tangent plane to surface by partial derivative and gradients vector that generate the plane, being $ \vec{u}$ and $\vec{v}$ with inner product $\vec{u} \times \vec{v}$.
What other ways possible?

thanks.
 A: For a surface that is given by an equation, the simplest way to get a normal vector is by taking gradients.
For instance, you could have the graph of a function, which would have the equation $z = f(x, y)$. That can be rearranged into $f(x, y) - z = 0$, and here we can take the gradient of the lefthand side. That gives the vector
$$
\nabla (f(x, y) - z) = \left(\frac{\partial f}{\partial x}(x, y), \frac{\partial f}{\partial y}(x, y), -1\right)
$$
which, if you insert an $x$ and $y$ value gives you the normal vector for the surface at that point.
Another example, where your surface is not the graph of a function (at least not a priori) would be the sphere $x^2 + y^2 + z^2 -1 = 0$. We take the gradient, and get $(2x, 2y, 2z)$. If you insert the $x, y$ and $z$ values of a point on the sphere into that vector, it gives you a normal vector at that point.

Now, if your surface (named $\sigma$, say) is given by a parametrization, it usually looks either like this:
$$
\sigma :\cases{x(u, v)= \ldots\\y(u, v)= \ldots\\z(u, v)= \ldots}
$$
or like this:
$$
\sigma(u, v) = (x(u, v), y(u, v), z(u, v))
$$
For instance, you can parametrize the sphere by
$$
\sigma(u, v) = (\sin v\cos u, \sin v\sin u, \cos v) \qquad 0\leq u \leq 2\pi, 0 \leq v \leq \pi
$$
In this case, to get the normal vector at a point $p$ (given by $u = u_0, v = v_0$), you do it by vector cross product. The two vectors $\vec u, \vec v$ you cross are (almost always) given by
$$
\vec u = \frac{\partial \sigma}{\partial u}(u_0, v_0),\quad \vec v = \frac{\partial \sigma}{\partial v}(u_0, v_0)
$$
In the case of the sphere, this gives us
$$
\vec u = (-\sin v_0\sin u_0, \sin v_0 \cos u_0, 0),\quad\vec v = (\cos v_0\cos u_0, \cos v_0 \sin u_0, -\sin u_0)
$$
which works nicely, except for the north and south poles, where $\vec u$ turns out to be $0$ (since $v_0$ is $0$ for the north pole and $\pi$ for the south), and $\vec v$ has a whole spectrum of different values (since $u_0$ can be whatever you want it to be and you will still be at the respective poles). So there you need to figure out something else.
