如何继续调整标签E的位置,如图所示?
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix,decorations.pathreplacing, calc, positioning,fit}
\begin{document}
\begin{tikzpicture}[x=0.5cm,y=0.5cm]
\coordinate[label = below left:A] (A) at (0,0);
\coordinate[label = above:B] (B) at (1,4);
\coordinate[label = above left:C] (C) at (8,5);
\coordinate[label = above right:D] (D) at (9,-2);
\coordinate[label = left :E] (E) at (3,-3);
\pgfmathsetmacro{\alpha}{asin(5/8)}
\pgfmathsetmacro{\beta}{asin(-1)}
\begin{scope}[thick,red,shorten >= 2pt,shorten <= 2pt]
\draw (A)--(B);
\draw (B)--(C);
\draw (C)--(D);
\draw (D)--(E);
\draw (E)--(A);
\draw (A)--(C);
\draw (A)--(D);
\draw (E)--(C);
\end{scope}
\draw[radius=0.5,red,thick] (C) ++({0.5*cos(\alpha)},{0.5*sin(\alpha)}) circle ;
\draw[radius=0.5,red,thick] (E) ++({0.5*cos(\beta)},{0.5*sin(\beta)}) circle ;
\begin{scope}[every node/.style={fill=blue!50,circle,inner sep=1pt}]
\foreach \n in {(A), (B), (C), (D), (E)}{
\node at \n {};
}
\end{scope}
\end{tikzpicture}
\end{document}
答案1
\coordinate[label = {[label distance=3pt]180:E}] (E) at (3,-3);
平均能量损失
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix,decorations.pathreplacing, calc, positioning,fit}
\begin{document}
\begin{tikzpicture}[x=0.5cm,y=0.5cm]
\coordinate[label = below left:A] (A) at (0,0);
\coordinate[label = above:B] (B) at (1,4);
\coordinate[label = above left:C] (C) at (8,5);
\coordinate[label = above right:D] (D) at (9,-2);
\coordinate[label = {[label distance=3pt]180:E}] (E) at (3,-3);
\pgfmathsetmacro{\alpha}{asin(5/8)}
\pgfmathsetmacro{\beta}{asin(-1)}
\begin{scope}[thick,red,shorten >= 2pt,shorten <= 2pt]
\draw (A)--(B);
\draw (B)--(C);
\draw (C)--(D);
\draw (D)--(E);
\draw (E)--(A);
\draw (A)--(C);
\draw (A)--(D);
\draw (E)--(C);
\end{scope}
\draw[radius=0.5,red,thick] (C) ++({0.5*cos(\alpha)},{0.5*sin(\alpha)}) circle ;
\draw[radius=0.5,red,thick] (E) ++({0.5*cos(\beta)},{0.5*sin(\beta)}) circle ;
\begin{scope}[every node/.style={fill=blue!50,circle,inner sep=1pt}]
\foreach \n in {(A), (B), (C), (D), (E)}{
\node at \n {};
}
\end{scope}
\end{tikzpicture}
\end{document}