如何创建锥体修改/躯干

如何创建锥体修改/躯干

简单来说,我想要创建这个图像: 1

这是我的 MWE:

\documentclass[12pt]{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}[rotate=0]
    \draw[violet, fill=violet!10] (4,0) arc(-45:225:4) -- (1.5,2) -- (4,0) node[left, black]{$l$};
\end{tikzpicture}

\end{document}

答案1

Ascope是你的朋友。你只能为里面的绘图设置选项,如旋转、缩放、原点等。

例如:

\documentclass[tikz,border=2mm]{standalone}

\tikzset
{% styles
   my node/.style={midway,black},
   my violet/.style={violet,fill=violet!#1},
   my violet/.default=10,
}

\begin{document}
\begin{tikzpicture}[line cap=round,line join=round]
  % dimensions
  \def\r{4}  % radius
  \def\h{10} % height
  \pgfmathsetmacro\a{asin(\r/\h)}       % angle
  \pgfmathsetmacro\g{sqrt(\h*\h-\r*\r)} % generatrix
  % right figure
  \draw[my violet] (-45:\r)  arc (-45:225:\r) -- (0,0) -- cycle node[my node,below left] {$l$};
  \draw[-latex]    (-45:0.6) arc (-45:225:0.6)                  node[pos=0.35,above]     {$\theta$};
  % left figure
  \begin{scope}[shift={(-10,0)},y=0.5cm,rotate=-20,scale=0.9]
    \draw[my violet=20] (0,\h) --   (-70:\r)   arc (-70:250:\r)   -- cycle;
    \draw[my violet]    (0,\h) --++ (\a-90:\g) arc (\a:180-\a:\r) -- cycle node[my node,yshift=0.5cm] {$l$};
  \end{scope}
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{bending}
\begin{document}
\begin{tikzpicture}[very thick]
\filldraw[cyan, fill=cyan!20, rotate=-20, miter limit=1] (0,3) -- (-70:2 and 1) arc[x radius=2, y radius=1, start angle=-70, end angle=250] -- cycle;
\filldraw[cyan, fill=cyan!20, rotate=-20] (0,3) -- (20:2 and 1) arc[x radius=2, y radius=1, start angle=20, end angle=160] --node[black, above left]{$l$} cycle;
\filldraw[cyan, fill=cyan!20] (5,1) --node[black, pos=0.6, below left]{$l$} +(-40:2) arc[radius=2, start angle=-40, end angle=220] -- cycle;
\draw[-latex] (5,1) +(-40:0.6)  arc[radius=0.6, start angle=-40, end angle=220] node[pos=0.3, above right]{$\theta$};
\end{tikzpicture}
\end{document}

折叠圆锥和圆形截面

相关内容