Tkiz② 三角形の作図
簡単な幾何の作図
($(座標)!0.3!(座標)$)は,最初の座標と後の座標の0.3:0.7の内分点を表します.
\begin{tikzpicture}
%点の設定
\coordinate [label=left:B](b) at (0,0);
\coordinate [label=above:A](a) at (2,3);
\coordinate [label=right:C](c) at (4,-0.3);
%内分点に点を打つ
\fill ($(a)!0.66!(b)$) node [above left] {P} circle [radius=1pt] ;
\fill ($(a)!0.6!(c)$) node [above right]{Q} circle [radius=1pt];
\fill ($(a)!0.4!(c)$) node [ right]{S} circle [radius=1pt];
\draw ($(a)!0.66!(b)$)--($(a)!0.4!(c)$);
\node at ($(a)!0.8!(b)$) [above left]{\fbox{1}};
\node at ($(a)!0.33!(b)$) [above left]{\fbox{2}};
\node at ($(a)!0.3!(c)$) [above right]{3};
\node at ($(a)!0.8!(c)$) [above right]{2};
%三角形の辺を結ぶ
\draw (a) -- (b)--(c)--cycle;
%直線l,mの交点を求めるためにl,mを設定
\draw [name path=l]($(a)!0.66!(b)$)--(c);
\draw [name path=m]($(a)!0.6!(c)$)--(b);
%交点の設定
\path[name intersections={of= l and m}];
%交点の点を描く
\fill (intersection-1)circle[radius=1pt] node[above]{R};
\node at (2.2,2.2)[]{\maru2};
\node at (2.7,1.3)[]{\maru1};
\node at (3.2,0.5)[]{\maru2};
\end{tikzpicture}
その結果