我有以下我设法绘制的 TikZ 图片:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[thick] (0cm,0cm) circle(1cm);
\foreach \x in {30,45} {
% lines from center to point
\draw[black,->] (0cm,0cm) -- (\x:1cm);
% dots at each point
\filldraw[black] (\x:1cm) circle(0.4pt);
}
\end{tikzpicture}
\end{document}
我想添加以下元素:
我想在两个箭头之间添加一个角度标记(带有“x”的圆圈的一部分)。
我想要一个在圆圈左边的图像和一个在圆圈右边的图像,以及两条线,一条从左边的图像到圆圈里的左箭头,一条从圆圈里的右箭头到右图像(不确定是否完全有意义,但想法是将每个图像映射到其中一个向量)。
答案1
纯粹基于猜测……
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows,angles,quotes}
\begin{document}
\begin{tikzpicture}[
angle radius = 7mm,
my angle/.style = {draw,
angle eccentricity=1.2,
font=\footnotesize,
<->}, % angle label position!
Arrow/.style= {ultra thick,gray,-stealth,
shorten <=7mm, %shorten >=0.5mm,
draw=gray}
]
\coordinate (c) at (0,0);
\draw[thick] (c) circle(1cm);
\foreach \x [count=\i] in {30,45}
{
% dots at each point
\filldraw[gray] (\x:1cm) circle(1pt);
% lines from center to point
\draw[black,->] (c) -- coordinate (m\i) (\x:1cm) coordinate (a\i);
}
\pic [my angle,"$x$"] {angle = a1--c--a2};
\pic [my angle,"$x$",red,angle radius = 10mm,] {angle = a1--c--a2};
% left image, simulated by node
\node (li) [draw, minimum size=20mm,align=center,left] at (-2,0) {left\\ image};
\node (ri) [draw, minimum size=20mm,align=center,right] at ( 2,0) {right\\ image};
\draw[Arrow] (li.center) to [out=45, in=135] (m2);
\draw[Arrow] (ri.center) to [out=225,in=-60] (m1);
\end{tikzpicture}
\end{document}
如果我的猜测正确,我会做出简短的解释(如果有必要的话)。
答案2
不知道这是否能解决您的问题。
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[thick] (0cm,0cm) circle(1cm);
\foreach \x in {15,60} {
% lines from center to point
\draw[black,->] (0cm,0cm) -- (\x:1cm);
% dots at each point
\filldraw[black] (\x:1cm) circle(0.4pt);
}
\draw[->] (15:0.5cm) arc (15:60:0.5);
\node at(35:0.3cm) {$x$};
% left image
\draw[thick] (-2.5cm,0cm) circle (1cm);
% right image
\draw[thick] (2.5cm,0cm) circle(1cm);
% line from left image to the left arrow
\draw[->] (-2.5cm,0cm) -- (60:1cm);
% line from the right arrow to the right image
\draw[->] (15:1cm) -- (2.5cm,0cm);
\end{tikzpicture}
\end{document}