So I have a body defined in a coordinate system and I project this body to the XY plane. How do I find the boundary of the projected shape? Which theory is this topic related to? Is there any paper/book that I can look at?
For simplicity sake, let us just consider convex body at the moment.
Thanks in advance, Steph
Let $f(x,y,z)=0$ be an implicit equation of the surface of the body. In order to get an implicit equation of its shadow on $x0y$ plane, it suffices to eliminate $z$ in the following system of equations :
$$\begin{cases}f(x,y,z)&=&0& \ \ \ \ (a)\\\dfrac{\partial f}{\partial z}(x,y,z)&=&0& \ \ \ \ (b)\end{cases}\tag{1}$$
This is rather intuitive. As the gradient in $(x,y,z)$, which is the normal vector to the surface at this point, has the following components :
$$\left(\dfrac{\partial f}{\partial x},\dfrac{\partial f}{\partial y},\dfrac{\partial f}{\partial z}\right),$$
imposing condition (1)b means that we select points belonging to the surface (condition (1)a) that have horizontal gradients (condition (1)b), thus are "eligible" for being projected onto a "shadow boundary" point.
For a detailed, more rigorous explanation, see the answer I made (just some days ago...) to this question : Is there a geometrical explanation for a method using critical points in a multivariable context which was in substance : "I have seen a text where they use (1), what does it mean geometricaly ?".
Remarks : 1) This method is not limited to convex bodies, but the boundaries obtained for non convex bodies may deserve interpretation...
2) This method is for smooth surfaces. When the surface is obtained by "gluing" surfaces as is the case for a cylinder with its lateral, top and bottom parts, a different treatment is possible.
Edit : You said you are interested by the particular case of the shadow of a real cylinder (the piece of a vertical cylinder between two planes $z\pm h/2$ that is rotated, then projected in any position onto the xOy plane). Here is a Matlab program that performs the operation ; I have assumed that the projection has been done on the xOy plane.
I have considered a general ellipse parametrized in the following way
$$\begin{pmatrix}x\\y\end{pmatrix}=\underbrace{\begin{pmatrix}\cos\theta&-\sin\theta\\ \sin\theta&\cos\theta\end{pmatrix}}_R\begin{pmatrix}a\cos t\\ b\sin t\end{pmatrix}$$
This program is based on the obtention of the particular values $t=t_0$ and $t=t_0+\pi$ such that the tangent vector to this ellipse
$$\begin{pmatrix}x'\\y'\end{pmatrix}=\begin{pmatrix}\cos\theta&-\sin\theta\\ \sin\theta&\cos\theta\end{pmatrix}\begin{pmatrix}-a\sin t\\ b\cos t\end{pmatrix}$$
is proportional to the displacement vector , i.e., has the same polar angle (line 6 in the program).
Fig. 1 : Visible contour is blue.