1

I have to find the normal of this function at a defined point $x$ and $z$, I have done A Level maths but that was some time ago but I don't think it was covered to this level, I am now doing a CS degree. I thought the best way would be to differentiate the function to get the tangent, then get the normal.

I have no idea where to start.

Any ideas on how I should go about it?

$$y = \frac{\sin (\sqrt{x^2+z^2})}{\sqrt{x^2+z^2}}$$

Andrew
  • 113
  • Interesting. You asked how to find the normal of a surface in 3D, and then you accepted an answer describing how to find the normal of a curve in 2D. –  Mar 11 '13 at 00:04
  • I thought it was correct since for example. y = 2x^3 -> dy/dx = 6x. So delta F should have a 3d vector? – Andrew Mar 11 '13 at 15:37
  • Based on what your saying since the function is sort of a rotation I could bodge it and rotate the 2d normal by the angle is on and get the correct normal. But ideally I am looking for a direct route to that 3d normal. – Andrew Mar 11 '13 at 15:45
  • is this of any use to me? http://mathworld.wolfram.com/NormalVector.html – Andrew Mar 11 '13 at 16:13
  • It's probably not a great idea to ask strangers on the internet for help if you have no way to tell whether the answers you get make sense for your question. If I give you an answer that contradicts the existing one, how will you know which one is right? Maybe rlgordonma misinterpreted and gave an answer to a different problem. Maybe I'm the one misinterpreting your question. You need to go back and check some basic properties that the normal vector you want ought to have, so that you can look at the answers and say, "Thanks, that looks right", or, "That doesn't make sense because..." –  Mar 11 '13 at 16:45
  • I have used face averaged in my program to estimate the normals which works ok. An by the looks of this paper http://www.geometrictools.com/Documentation/MeshDifferentialGeometry.pdf rlgordonma's answer using the partial partial derivatives should be fine. (top of page 4) – Andrew Mar 11 '13 at 17:42
  • If you say so, but there is a big difference between the PDF's $\left(-\frac{\partial f}{\partial x},1,-\frac{\partial f}{\partial z}\right)$ and rlgordonma's $\left(-\frac{\partial f}{\partial z},\frac{\partial f}{\partial x}\right)$... –  Mar 11 '13 at 18:07

1 Answers1

1

The normal to a curve at a point is perpendicular to the gradient at that point. In your case:

$$f(x,z) = \frac{\sin{\sqrt{x^2+z^2}}}{\sqrt{x^2+z^2}}$$

$$\begin{align}\nabla f &= \left ( \frac{\partial f}{\partial x}, \frac{\partial f}{\partial z}\right ) \\ &= \left ( \frac{x \cos \left(\sqrt{x^2+z^2}\right)}{x^2+z^2 }-\frac{x \sin \left(\sqrt{x^2+z^2}\right)}{\left(x ^2+z^2\right)^{3/2}}, \frac{z \cos \left(\sqrt{x^2+z^2}\right)}{x^2+z^2 }-\frac{z \sin \left(\sqrt{x^2+z^2}\right)}{\left(x ^2+z^2\right)^{3/2}}\right ) \end{align}$$

The unit normal to the curve is then

$$\frac{\left ( -\frac{\partial f}{\partial z}, \frac{\partial f}{\partial x}\right )}{\sqrt{\left ( \frac{\partial f}{\partial x} \right )^2+\left ( \frac{\partial f}{\partial z} \right )^2}} $$

Ron Gordon
  • 138,521
  • Hold on I'm a little confused by this now. How would I go about getting a directional vector for the normal at a defined point e.g. x=0.5, z=0.5? – Andrew Mar 10 '13 at 22:06
  • 1
    Take the partial derivatives romthe equation defining the gradient, and apply them to the final equation defining the normal. Plug in $x=0.5$, $z=0.5$ into the expressions for the partial derivatives. – Ron Gordon Mar 10 '13 at 22:09