如何简单地旋转而不进行任何变换

如何简单地旋转而不进行任何变换

因此,我尝试在(-2,-2)正好 60 度的点处绘制一个简单的矢量。但是,当我旋转时,它会将箭头放在完全不同的地方。我不知道还能做什么,因为输入xshiftyshift选项需要太多猜测。我该怎么办?

\documentclass[tikz,border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,calc,positioning,decorations.pathreplacing,calligraphy}
\usepackage{tikzsymbols}

\begin{document}
\begin{tikzpicture}
\filldraw (-2,-2) circle (1.5pt);
\draw[thick] (-2,-2) ..controls +(60:1) and +(160:1) ..(0,-1)
            ..controls +(340:1) and +(250:1) ..(2.5,0);
\draw (-2.25,-2.25) rectangle (-1.75,-1.75);
\draw[-stealth,rotate=60,thick] (-2,-2)--(-1.5,-2);
\end{tikzpicture}

\end{document}

答案1

默认情况下,旋转围绕起源(0,0),要围绕另一个点旋转,必须明确指定。

我引用手册:

/tikz/旋转={<程度>:<协调>} (无默认值)

旋转坐标系<程度> 围绕点 <协调>。

\draw[-stealth,rotate around ={60:(-2,-2)},thick,blue] (-2,-2)node{x}--(-1.5,-2);

截屏

\documentclass[tikz,border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,calc,positioning,decorations.pathreplacing,calligraphy}
\usepackage{tikzsymbols}

\begin{document}
\begin{tikzpicture}
\filldraw (-2,-2) circle (1.5pt);
\draw[thick] (-2,-2) ..controls +(60:1) and +(160:1) ..(0,-1)
            ..controls +(340:1) and +(250:1) ..(2.5,0);
\draw (-2.25,-2.25) rectangle (-1.75,-1.75);
\draw[-stealth,rotate around ={60:(-2,-2)},thick,blue] (-2,-2)node{x}--(-1.5,-2);
\end{tikzpicture}

\end{document}

答案2

太长了,无法发表评论...

你在寻找这样的东西吗:

在此处输入图片描述

使用极坐标绘制箭头:

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

\begin{document}
    \begin{tikzpicture}
\filldraw (-2,-2) circle (1.5pt);
\draw[thick] (-2,-2) ..controls +(60:1) and +(160:1) ..(0,-1)
            ..controls +(340:1) and +(250:1) ..(2.5,0);
\draw (-2.25,-2.25) rectangle (-1.75,-1.75);
\draw[-stealth] (-2,-2) -- ++ (60:1);
    \end{tikzpicture}
\end{document}

相关内容