这是旋转位似变换.
%旋转位似变换
%#1, 变换的中心点
%#2, 被变换的点
%#3, 旋转角度
%#4, 位似比例
%#5, 结果点的名称
\def\RotHom#1#2#3#4#5{
\tkzURotateAngle(#1,#3)(#2)
\tkzGetPoint{rotated-point-temp}
\tkzUHomo(#1,#4)(rotated-point-temp)
\tkzGetPoint{#5}
}
题目中第一个图形画出的情况: 以 A
为中心, 旋转角度为 -45
度, 位似比例 sqrt(2)
, 把 x
轴变成直线 BE
\begin{tikzpicture}
\tkzDefPoints{0/0/O,-4/0/B,4/0/C,0/4/A,-5/0/xmin,5/0/xmax,0/-5/ymin,0/5/ymax}
\begin{scope}[thick]
\draw [->] (xmin) -- (xmax) node[below]{$x$};
\draw [->] (ymin) -- (ymax) node[above]{$y$};
\end{scope}
\draw (A) node[right]{$A$} -- (B) node[below left]{$B$} -- (C) node[below]{$C$} -- cycle;
\def\RotAngle{-45}
\RotHom{A}{B}{\RotAngle}{sqrt(2)}{B'}
\RotHom{A}{C}{\RotAngle}{sqrt(2)}{C'}
\tkzDrawLine[add=-1cm and 1cm](B',C')
%取点 D, 把 D 变换为点 E
\foreach \i[count=\ci,evaluate={\j = \i*100}] in {0.3,0.6,0.8}{
\coordinate [label=-90:$D$] (D\ci) at ($(B)!\i!(C)$);
\coordinate [label=200:$E$] (E\ci) at ($(A)!sqrt(2)!\RotAngle:(D\ci)$);
\draw [dashed,draw=red!\j!cyan] (A) -- (D\ci) -- (E\ci) -- cycle;
}
\end{tikzpicture}
对于第二个问题, 应该有多个情况, 参照下图:
容易看出需要考虑以下点
N= (-3,-1), (-2,-2), (-1/2,-7/2), (3,-7)
所以
%#1, 变换中心点
%#2, 角度
%#3, 比例
\tikzset{rotate scale trf/.style args={c#1d#2r#3}{rotate around={#2:#1},scale around={#3:#1}}}
\begin{tikzpicture}
\tkzDefPoints{0/0/O,-4/0/B,4/0/C,0/4/A,0/3/F,-5/0/xmin,5/0/xmax,0/-5/ymin,0/5/ymax}
\begin{scope}[thick,>=Stealth]
\draw [->] (xmin) -- (xmax) node[below]{$x$};
\draw [->] (ymin) -- (ymax) node[above]{$y$};
\end{scope}
\node [right] at(F) {$F$};
\draw (A) node[right]{$A$} -- (B) node[below left]{$B$} -- (C) node[below]{$C$} -- cycle;
\draw [rotate scale trf=c{(A)}d{-45}r{sqrt(2)}]
(-4,0) coordinate (B') -- (4,0) coordinate (C');
%\foreach [count=\ct, evaluate={\val = 100*\ct/8}]\CenterPt/\RotDegree/\ScaleNum in {F/45/sqrt(2),F/-45/sqrt(2),F/45/{1/sqrt(2)},F/-45/{1/sqrt(2)},F/90/1,F/-90/1}{
% \path [rotate scale trf=c{(\CenterPt)}d{\RotDegree}r{\ScaleNum}]
% [draw=red!\val!green]
% (-4,0) coordinate (B') -- (4,0) coordinate (C');
%}
\foreach [count=\n,evaluate={\v=100*\n/4}] \NPt/\negRotDegree/\ScaleNum in {{-3,-1}/90/1,{-2,-2}/-45/sqrt(2),{-1/2,-7/2}/-45/{1/sqrt(2)},{3,-7}/-90/1}{
\coordinate (N) at (\NPt);
\fill (N) circle (2pt);
\coordinate [rotate scale trf=c{(F)}d{\negRotDegree}r{\ScaleNum}] (M) at(\NPt);
\fill (M) circle (2pt) node[above,circle,draw, inner sep=1pt]{\n};
\draw [draw=red!\v!cyan](N) -- (M) -- (F) -- cycle;
}
\end{tikzpicture}
如果希望看到动态图, 建议使用其他软件, 例如 Geogebra.
问 平面几何动点问题中的绘图方法