# How can I draw cones are inscribed in and circumscribed about a regular triangular pyramid?

I want to draw two cones are inscribed in and circumscribed about a regular triangular pyramid. I can not draw with tex. I draw it in GeoSpacW like this

Here's an attempt in Metapost using luamplib. Compile with lualatex.

If you want "real" 3D you might consider using Asymptote. If you want to try TikZ then you should probably also study some of these examples.

You might want change the value of S to change the height - if you do that you'll need to adjust r so that the red arc meets the diagonals neatly. Follow the links above for detailed references and other examples.

\RequirePackage{luatex85}
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
beginfig(1);
path outer, inner;
outer = fullcircle xscaled 144 yscaled 55;
inner = outer scaled 1/2;

pair A,B,C,S;

A = point 14/3 of outer;
B = point 22/3 of outer;
C = point  6/3 of outer;

S = 144 up;
r = 1/4;

drawoptions(withcolor 2/3 red);
draw subpath(+4-r,r) of outer dashed withdots scaled 1/2;
draw subpath(-4-r,r) of outer -- S -- cycle;
drawoptions();

dotlabel.top ("$C$", C) withcolor 1/2 white;

drawoptions(withcolor 2/3 blue);
draw inner dashed withdots scaled 1/2;
draw A--B--C--cycle dashed evenly scaled 1/2;
draw A--S;
draw B--S;
for i=1/4 step 1/4 until 8:
draw point i of inner -- S dashed withdots scaled 1/2;
endfor

drawoptions();

dotlabel.top ("$S$", S);
dotlabel.llft("$A$", A);
dotlabel.lrt ("$B$", B);

endfig;
\end{mplibcode}
\end{document}