見出し画像

TikZ作品集「座標平面上の対称な点」の説明図

座標平面上の点を、$${x}$$軸・$${y}$$軸・原点に関して対称な点を説明するための図を作りました。バックアップがてらTeXソースを貼っておきます。CloudLaTeXに貼り付けるだけでコンパイルが通ると思います。よろしかったらどうぞ。

ソースコード

\documentclass[dvipdfmx,border=2mm,multi=pageSplit]{standalone}
\usepackage{tikz}

\definecolor{mistyrose}{rgb}{1.0, 0.89, 0.88}
\definecolor{bisque}{rgb}{1.0, 0.89, 0.77}
\definecolor{palegreen}{rgb}{0.59,0.98,0.59}

\begin{document}
\begin{pageSplit}
\begin{tikzpicture}[scale=1.0]

\def\Min{-4}\def\Max{4}
\def\Px{2}\def\Py{3}

\draw[->,>=stealth] (\Min,0)--(\Max,0) node [below,yshift=-2pt] {\colorbox{bisque}{$x$}};%%x軸を描画
\draw[->,>=stealth] (0,\Min)--(0,\Max) node [left,yshift=-2pt] {\colorbox{palegreen}{$y$}};%%y軸を描画
\draw (0,0) node [below right] {\colorbox{magenta!50!white}{$\rm O$}};

% 目盛り
\draw (\Px,0) node [below right] {$a$};
\draw (-\Px,0) node [below left] {$-a$};
\draw (0,\Py) node [below left] {$b$};
\draw (0,-\Py) node [below left] {$-b$};

% 直角記号
\draw[orange] ([xshift=5pt] \Px,0)--([xshift=5pt,yshift=5pt] \Px,0)--([yshift=5pt] \Px,0);
\draw[green] ([xshift=5pt] 0,\Py)--([xshift=5pt,yshift=5pt] 0,\Py)--([yshift=5pt] 0,\Py);

% 対称線
\draw[orange] (\Px,\Py)--(\Px,-\Py);
\draw[green] (\Px,\Py)--(-\Px,\Py);
\draw[magenta] (\Px,\Py)--(-\Px,-\Py);
\draw[orange,dashed] (\Px,-\Py)--(-\Px,-\Py);
\draw[green,dashed] (-\Px,\Py)--(-\Px,-\Py);

% 等しい記号
\draw[orange] (\Px,\Py/2) node {○};
\draw[orange] (\Px,-\Py/2) node {○};
\draw[green] (\Px/2,\Py) node {△};
\draw[green] (-\Px/2,\Py) node {△};
\draw[magenta] (\Px/2,\Py/2) node {□};
\draw[magenta] (-\Px/2,-\Py/2) node {□};

% 点
\draw[fill=black] (\Px,\Py) circle [radius=1.5pt];
\draw[orange,fill=orange] (\Px,-\Py) circle [radius=1.5pt];
\draw[green,fill=green] (-\Px,\Py) circle [radius=1.5pt];
\draw[magenta,fill=magenta] (-\Px,-\Py) circle [radius=1.5pt];

% 点の座標
\draw (\Px,\Py) node [above right] {{\rm A}$(a,\ b)$};
\draw (\Px,-\Py) node [below right] {${\rm B}(a,\ \colorbox{bisque}{$-b$})$};
\draw (-\Px,\Py) node [above left] {${\rm C}(\colorbox{palegreen}{$-a$},\ b)$};
\draw (-\Px,-\Py) node [below left] {\colorbox{magenta!50!white}{${\rm D}(\colorbox{palegreen}{$-a$},\ \colorbox{bisque}{$-b$})$}};


\end{tikzpicture}
\end{pageSplit}
\end{document}

サンプルはこちら


この記事が気に入ったらサポートをしてみませんか?