这个图形如何制作?

这个图形如何制作?

我想要制作这个图: 在此处输入图片描述

但是,我能做的最多就是:

在此处输入图片描述

\documentclass{minimal}    
\usepackage{tikz}    
\usepackage{xcolor}    
\usepackage[utf8]{inputenc}     
\usepackage[T1]{fontenc}     
\begin{document}
\begin{center}    
\begin{tikzpicture}[scale=0.6]    
\draw[ultra thick] (0,0) ellipse (3cm and 2cm);    
\draw[ultra thick,fill=yellow] (0,3) circle [radius = 0.3cm];    
\draw[thick] (-0.1,3.4)--(0.1,3.4)--(0.1,3.5)--(-0.1,3.5)--(-0.1,3.4);    
\draw[thick] (0,3.4)--(0,4);    
\draw[thick,dashed] (0,0)--(0,2.7);    
\draw[thick,dashed] (0,0)--(3,0);    
\draw[thick,dashed] (0,3.4)--(3,0);    
    \node at (-0.3,1.5) {h};    
        \node at (3.3,0) {A};    
    \node at (1.5,2.2) {\textit{l}};    
        \node at (1.5,-0.3) {\textit{r}};    
\end{tikzpicture}    
\end{center}    
\end{document}

答案1

代码解释了一切。

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{angles,quotes}
\begin{document}
\begin{tikzpicture}[scale=0.6]
\coordinate (A) at (0,0);
\coordinate (B) at (0,3);
\coordinate[label=right:A] (C) at (3,0);
\filldraw[brown,rounded corners=2pt] (-2.2,-0.5) rectangle (-1.9,-3);
\filldraw[brown,rounded corners=2pt] (2.2,-0.5) rectangle (1.9,-3);
\draw[brown,ultra thick,fill=brown!30] (-3,0) -- +(0,-0.2) arc (-180:0:3cm and 1.2cm) -- +(0,0.2) -- cycle;
\draw[brown,ultra thick,fill=brown!30] (A) ellipse (3cm and 1.2cm);
\foreach \ang in {30,60,...,360} {
  \draw (B) -- +(\ang:0.6);
  \fill[white] (B) circle (0.4cm);
}
\draw[fill=white] (-0.1,3.2) rectangle (0.1,3.5);
\draw[thin,fill=yellow] (B) circle [radius = 0.3cm];
\draw[thick] (0,3.5)--(0,4);
\draw[thick,dashed] (B) --  node[left] {$h$} (A)
                    -- node[below]{$r$}  (C)
                    -- node[right]{$\ell$}  (B);
\path pic[draw, angle radius=7mm,"$\varphi$",angle eccentricity=0.75] {angle = B--C--A};

\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容