\begin{tikzpicture}[scale=1.0]% 1cmグリッド(薄いグレードット)\draw[step=1cm,black!50,dotted] (0,0) grid (7,7);% 座標軸\draw[gray!50,->] (0,0) -- (7,0) node[right] {$x$};\draw[gray!50,->] (0,0) -- (0,7) node[above] {$y$};% 点の定義\coordinate (O) at (0,0);\coordinate (A) at (6,0); % (6,0)\coordinate (B) at ({6*cos(72)},{6*sin(72)}); % 72°\coordinate (C) at ({6*cos(144)},{6*sin(144)}); % 144°\coordinate (Dfull) at ({6*cos(216)},{6*sin(216)});\coordinate (Efull) at ({6*cos(288)},{6*sin(288)});% 半径6cmの円\draw[gray!50] (O) circle (6);% 正五角形(外接円半径6)\draw[gray] (A) -- (B) -- (C) -- (Dfull) -- (Efull) -- cycle;% 五芒星(頂点を全て結ぶ)\draw (A) -- (C) -- (Efull) -- (B) -- (Dfull) -- cycle;% Oから頂点A,Bへの線\draw[thick, blue] (O)--(A);\draw[thick, blue] (O)--(B);% Oから辺ABへの垂線 OD\coordinate (D) at ($(A)!(O)!(B)$);\draw[thick,blue,dashed] (O) -- (D);% OB と AC の交点 E(OB ⟂ AC)\path[name path=OB] (O) -- (B);\path[name path=AC] (A) -- (C);\path[name intersections={of=OB and AC,by=E}];% OD と AC の交点 F (OD ∠ AC)\path[name path=OD] (O) -- (D);\path[name path=AE] (A) -- (E);\path[name intersections={of=OD and AE,by=F}];% Fから辺AOへの垂線 FG\coordinate (G) at ($(O)!(F)!(A)$);\draw (F) -- (G);% 点の描画\foreach \P in {O,A,B,C,D,E,F,G}\fill (\P) circle (1.8pt);% ラベル\node[below left] at (O) {$O$};\node[above right] at (A) {$A$};\node[above right] at (B) {$B$};\node[above left] at (C) {$C$};\node[above right] at (D) {$D$};\node[above right] at (E) {$E$};\node[below right] at (F) {$F$};\node[below right] at (G) {$G$};\end{tikzpicture}
大変勉強になった。TikZにおいて,

















