Normal to a cylinder in cartesian coordinates

12.3k Views Asked by At

How can I find a normal vector to a cylinder in cartesian coordinate system? I think I know it is $[r\cos \theta, r\sin \theta,0]$ in cylindrical, but I wanna dot the normal with my function $f$ that is in cartesian coordinates.

1

There are 1 best solutions below

0
On

In cylindrical coordinates, with basis vectors $\vec{1}_r,\vec{1}_{\theta},\vec{1}_{z}$, the normal to the cylinder is simply $\vec{1}_r$.

Your expression already is in Cartesian coordinates: you give an $x$ component, a $y$ component, and a $z$ component. Unless you want to scale the normal with the radius of the cylinder (and why would you want that?), the normal is $$[\cos(\theta),\sin(\theta),0]$$ If you want this in function of $x,y$ rather than in function of $\theta$, use the conversion formulas between cylindrical and cartesian $$x=r \cos(\theta)$$ $$y=r \sin(\theta)$$ $$r=\sqrt{x^2+y^2}$$ Thus $$\frac{x}{\sqrt{x^2+y^2}}=\cos(\theta)$$ $$\frac{y}{\sqrt{x^2+y^2}}=\sin(\theta)$$ So the normal is $$\left[\frac{x}{\sqrt{x^2+y^2}},\frac{y}{\sqrt{x^2+y^2}},0\right]$$