Anonymous 1679
I copy this code

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\fill[top color=gray!50!black,bottom color=gray!10,middle color=gray,shading=axis,opacity=0.25] (0,0) circle (2cm and 0.5cm);
\fill[left color=gray!50!black,right color=gray!50!black,middle color=gray!50,shading=axis,opacity=0.25] (2,0) -- (0,6) -- (-2,0) arc (180:360:2cm and 0.5cm);
\draw (-2,0) arc (180:360:2cm and 0.5cm) -- (0,6) -- cycle;
\draw[densely dashed] (-2,0) arc (180:0:2cm and 0.5cm);
\draw (-2,0)--(2,0);
\end{tikzpicture}
\hspace{1cm}
\begin{tikzpicture}
\end{document}

from https://tex.stackexchange.com/questions/42812/3d-bodies-in-tikz and I see this paper https://www.researchgate.net/figure/Correct-drawing-of-a-cone_fig2_315620080 from Internet. The paper said that, mypicture seems incorrect cone. How to use TikZ 2D to draw a correct cone?
user 3.14159
It depends on what you mean by 2D. If you mean that you want to have a 2D projection of a cone, you could use [3dtools](https://github.com/marmotghost/tikz-3dtools).

\documentclass[border=3mm,tikz]{standalone}
\usetikzlibrary{calc,3dtools}% https://github.com/marmotghost/tikz-3dtools
\begin{document}
\begin{tikzpicture}[3d/install view={phi=110,psi=0,theta=75}]
\end{tikzpicture}
\end{document}

![Screen Shot 2021-05-10 at 9.28.38 PM.png](/image?hash=ba1ad7e5c481493e0b0e2d582a2b36f4b9c71691e1cbd175cc32b85d2636b975)

If you mean how to compute the critical angle: it is determined by the aspect ratio, i.e. the ratio between the two "radii" of the ellipse in your example, and the ratio between the height and radius.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\pgfmathsetmacro{\alphacrit}{acos(1/12)}
fill opacity=0.25]
(90-\alphacrit:2 and 0.5) -- (0,6) -- (90+\alphacrit:2 and 0.5)

![Screen Shot 2021-05-10 at 9.39.37 PM.png](/image?hash=bf0c45c2a4ef9eb14b61b4cf2737cc1dbc2aff672722d7548655d87a1b6d51ec)