2

I found a strange problem in my tikz picture. I use calc library to draw a line, and rotate this line with some angle, but I find I cannot specify its rotate center point. In other words, the rotation seems has no relationships with the center point I specified.

A minimal example is as follows:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
  \draw [step=.5,help lines] (-3,-3) grid (3,3);
  \node [fill=black, circle, minimum size=0.05, label=-30:$O$] at (0,0 {};
  \coordinate (r5) at (1,1);
  \draw [fill=yellow] ($(r5)+(1,0)$) circle (0.05);
  \draw [fill=yellow] ($(r5)+(1,2)$) circle (0.05);
  \draw [fill=yellow] ($(r5)+(1,1)$) circle (0.05);
  \draw [rotate around={90:($(r5)+(1,1)$)}, red, thick] ($(r5)+(1,0)$) -- ($(r5)+(1,2)$);
\end{tikzpicture}
\end{document}

As my understanding, the code rotate a line with its center point. In other words, the line constructed with the three yellow point should rotate around the middle point. But actually the effect is as follows: the out put of the codes

So, can you give me some help? Thanks for advance!

3

0

Browse other questions tagged .