我正在尝试绘制下面的图片,但没有成功(我画了 a 部分,但画不出 b 部分)
这是我用来画a部分的
\begin{center}
\begin{tikzpicture}[font=\boldmath]\large
\coordinate (A) at (0,0) {};
\coordinate (B) at (2,0) {};
\coordinate (C) at (1,1) {};
\coordinate (D) at (3,1) {};
\begin{scope}[shift={(0,1.5)}]
\draw[thick, black, dotted] (4,0) -- (5,1) node[sloped,midway,above] {};
\draw[thick, black, dotted] (1,1) -- (5,1) node[sloped,midway,above] {};
\draw[->, thick, black, arrows={-latex}] (0,0) -- (4,0) node[sloped,right=-0.7cm,above] {$\mathsf{A}$};
\draw[->, thick, black, arrows={-latex}] (0,0) -- (1,1) node[sloped,midway,above=-0.1cm] {$\mathsf{B}$};
\draw[->, thick, black, arrows={-latex}] (0,0) -- (5,1) node[sloped,midway,above=-0.1cm] {$\mathsf{A+B}$};
\end{scope}
\end{tikzpicture}
\end{center}
答案1
一种可能性是:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{angles,decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}[
>=latex]
\draw[dashed]
(5,0) coordinate (X) --
(0,0) coordinate (O);
\path
coordinate (A) at (20:4.5cm)
coordinate (B) at (55:3cm)
coordinate (AB) at (75:5cm);
\foreach \Coor in {A,B,AB}
{
\draw[->,thick,shorten >= 2pt] (O) -- (\Coor);
\node[circle,fill,inner sep=1.5pt,label={above right:$\Coor$}]
at (\Coor) {};
}
\node[draw,circle,fill=white,inner sep=1.5pt,label={below left:$O$}] {};
\draw[decorate,decoration={brace,raise=5pt},black!70,text=black]
(O) --
node[sloped,above=5pt] {(length $A$)$\cdot$(length $B$)}
(AB);
\path[->,black!70]
pic[draw,line width=0.7pt,angle radius=15mm] {angle={X--O--A}}
pic[draw,line width=0.35pt,angle radius=15mm] {angle={A--O--AB}}
pic[draw,line width=0.35pt,angle radius=18mm] {angle={X--O--B}}
pic[draw,line width=0.7pt,angle radius=18mm] {angle={B--O--AB}};
\end{tikzpicture}
\end{document}
答案2
另一种可能性是:
\documentclass[tikz,border=0.1cm]{standalone}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}[font=\boldmath, >=latex, decoration = {brace,raise=4pt},line width=0.7pt]
\foreach \n/\s/\l/\p/\a in {o/draw/{$0$}/{0,0}/left,A/fill/{$A$}/{20:5}/right,B/fill/{$B$}/{45:3.5}/right,AB/fill/{$AB$}/{65:6}/right}
\node (\n)[\s,circle,scale=0.3,label={\a:\l}]at (\p){};
\draw (o) edge[dashed] ++(5,0)
[->] edge (A)
[->] edge (B)
[->] edge (AB);
\draw[decorate,thin] (o) -- node[sloped,above=5pt] {(length $A$)$\cdot$(length $B$)} (AB);
\foreach \t/\a/\b/\r in {/0/20/1.6,thin/20/65/1.6,thin/0/45/2,/45/65/2}
\draw [->,\t](\a:\r) arc (\a:\b:\r);
\end{tikzpicture}
\end{document}
输出如下: