在乳胶中绘制圆形

在乳胶中绘制圆形

我想使用 tikz 包等绘制下图,但我不知道如何获得彩色圆形。(我是这个页面的新手,如果我的问题太原始,请原谅。) 在此处输入图片描述

答案1

截屏

通过源代码中的注释进行解释。

\documentclass[border=5mm]{standalone}

\usepackage{tikz}% this package is used to build figures
\usetikzlibrary{angles}% this library allows you to easily draw angles and add text to them. It requires these angles to be defined by 3 points with the operations \node or \coordinate. It is not possible to use coordinates such as (0,0). Thus, I defined 4 points named (a), (b), (o) and (d) when building the first path.
\usetikzlibrary{patterns}% this library allows you to fill the path with a repetitive pattern like a mosaic. I used the pattern `north east lines`.

\usepackage{siunitx}% this package defines the macro \ang{} which allows to correctly display angles in degrees.

\begin{document}

\begin{tikzpicture}      
\draw (60:3cm)coordinate(a)--(0,0)coordinate(o)--(-60:3cm)coordinate(b);  
% The curve is drawn using 2 bezier curves symmetrical to the horizontal axis. The first starts at `(0,0)` and ends at `(4,0)`. The two points `+(60:2)` and `+(90:2)` are the control points of this Béziers curve. The first control point is `+(60:2)`. The + sign means that its placement is relative to the starting point `(0,0)`. It is placed 2 cm from the starting point at an angle of 60°. The second control point `+(90:2)` is placed relative to the end of the bezier curve `(4,0)`. 
\draw[pattern color=red,pattern=north east lines] (0,0)..controls +(60:2) and +(90:2) .. (4,0)coordinate(d)..controls +(-90:2) and +(-60:2)..(0,0); 
\draw[->] (0,0)--(3,0);
\draw[dashed] (3,0)--(4.5,0);
\pic [draw,pic text=\ang{60},angle radius=5mm,angle eccentricity=1.6]{angle=d--o--a};
\pic [draw,pic text=\ang{60},angle radius=6mm,angle eccentricity=1.6]{angle=b--o--d};
\end{tikzpicture}


\end{document}

相关内容