Constraints on conical coffee cup constructions of cardioids & catacaustics
Solution 1:
One nuisance is if the cylinder is too tall the rays won't reach the bottom. Similarly for the cone if a side blocks the light. If either cup is too full, the lighting won't trace long enough lines to touch the catacaustic. But tallness and fullness don't change the angle of the lines traced in the coffee.
The allowed height and fullness as a function of the cup angle and lighting is an additional calculation, maybe the more difficult part of the problem.
Neglecting this for now, for a cylinder consider the vertical lines $(x_0, y_0,z)$ on the side of the cup. If you think about it, you can convince yourself for any of these lines the light reflected off points from the line is a straight line in the coffee and independent of the downward angle of the light (sufficient it isn't horizontal or vertical).
So for a cylinder, any downward light angle (except vertical) traces a cardioid.
For a cone centered at the origin with slope $m$, first let the light be parallel to a line on the side of the cup like in the video.
Similarly consider the lines $\Big(t x_0, t y_0, m(t-1)\sqrt{x_0^2+y_0^2} \Big)$, given by varying $t$, on the sides of the cone. The light reflected off these lines also traces straight lines in the coffee because the traced lines are a combination of linear movements.
We claim these are the unique lines on sides which reflect light onto the tangents of the catacaustic. Since these lines partition the sides of the cup, any tangent of the catacaustic is traced by light reflecting off one of these lines. Uniqueness apparently holds since any open neighborhood of a point which reflects light onto a point on the catacaustic is folded upon reflection so all lines through the point except the one we picked out are projected onto a $v$.
Something important to realize is the lines in the coffee are not independent of $m$. Since a cardioid has specific line angles, there should be a unique $m$ which generates a true cardioid.
We will calculate it.
WLOG let the light be in the direction $(-1, 0, -m)$, cone described by $z = m \sqrt{x^2+y^2} - m$, and coffee at level $z=0$.
For $p = (t_0 x_0, t_0 y_0, m(t_0 -1))$ with $x_0^2 + y_0^2 = 1$ on the side, the vectors $(x_0, y_0, m)/\sqrt{1+m^2}, \ (m x_0, m y_0, -1)/\sqrt{1+m^2}$, and $(-y_0, x_0 , 0)$ are an orthogonal basis for $\mathbb{R}^3$. They are parallel, perpendicular, and horizontally tangent to the cone at $p$ respectively.
The light reflected off $p$ has "tangent component" and "parallel component" unchanged. However the perpendicular component is reversed. This give \begin{align} &= \Big((-1, 0, -m)\cdot (x_0, y_0, m)/\sqrt{1+m^2}\Big) (x_0, y_0, m)/\sqrt{1+m^2} - \Big((-1, 0, -m) \cdot (m x_0, m y_0, -1)/\sqrt{1+m^2} \Big) (m x_0, m y_0, -1)/\sqrt{1+m^2} + \Big((-1, 0,-m) \cdot (-y_0, x_0 , 0) \Big) (-y_0, x_0 , 0) \\ &=\left(\frac{(-1 + m^2)x_0^2- 2m^2 x_0}{1+m^2} - y_0^2, \frac{(-1+m^2) x_0 y_0 - 2m^2 y_0^2}{1+m^2} + x_0 y_0 , \frac{-2mx_0 -m^3 + m}{1+m^2} \right):= l \end{align} The reflected light at $p$ can be parameterized $p + t l$. It touches the coffee when \begin{align} &m(t_0 -1) + t \frac{-2mx_0 -m^3 + m}{1+m^2} = 0 \\ &\implies t = \frac{t_0-1}{-2x_0 -m^2 + 1} \end{align} Substituting in $p + tl$ $$ \left(t_0x_0 + \left(\frac{(-1 + m^2)x_0^2- 2m^2 x_0}{1+m^2} - y_0^2\right)\frac{t_0-1}{-2x_0 -m^2 + 1},t_0y_0 + \left(\frac{(-1+m^2) x_0 y_0 - 2m^2 y_0^2}{1+m^2} + x_0 y_0\right)\frac{t_0-1}{-2x_0 -m^2 + 1}, \ 0 \right) \ \ \ \ \ \ \ (1) $$
A necessary condition for a $m$ to give a cardioid is the chord at $(0,1,0)$ described by $(1)$ agrees with the chord for the cardioid at $(0,1,0)$. Wikipedia describes what this should be and it is the line $y = x+1$. (It is seen in the picture, but to use their formula let $\theta = \pi/4$, shift the circle back to the origin, and scale the radius to $1$).
Let $x_0 = 0, y_0 = 1$ in $(1)$ $$ \left(-\frac{t_0-1}{-m^2 + 1},t_0 + \frac{-2m^2}{1+m^2} \frac{t_0-1}{-m^2 + 1}, \ 0 \right) $$ Substitute $s:= \frac{t_0-1}{1-m^2}$ $$ \left(-s, (1-m^2) s + 1 + \frac{-2m^2}{1+m^2} s, \ 0 \right) $$ Set the $y$-component minus the $x$-component equal to $1$
$$ \left(2-m^2 - \frac{2m^2}{1+m^2}\right)s + 1 = 1 $$ i.e. $m^4 + m^2 - 2 = 0$. Since $m>0$ it follows $m=1$ as the unique slope which generates a cardioid.