나는 다음과 같은 그림을 그리고 싶다.
하지만 두 개의 점선으로 정렬하는 방법을 모르겠습니다.
\documentclass[margin=10pt]{standalone}
\usepackage{tkz-euclide}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\pgfmathsetmacro{\a}{39/7} % AC
\pgfmathsetmacro{\b}{41/7} % AB
\pgfmathsetmacro{\c}{50/7} % BC
\tkzDefPoints{0/0/B,\c/0/C}
\tkzInterCC[R](B,\b cm)(C,\a cm) \tkzGetFirstPoint{A}
\tkzDefPointWith[orthogonal normed](B,A) \tkzGetPoint{B1}
\draw[thin,blue,densely dashed](B) -- (B1);
\tkzDefPointWith[orthogonal normed,K=-1](A,B) \tkzGetPoint{A1}
\draw[thin,blue,densely dashed](A) -- (A1);
\draw[thin,Stealth-Stealth]($(A)+(0,1)$) -- node[above,sloped]{$41$}($(B)+(0,1)$);
\fill[yellow!70] (B) -- (A) -- (C);
\tkzDrawPolygon[thick](A,B,C)
\end{tikzpicture}
\end{document}
답변1
tkz-euclide
다른 점 사이에 점을 배치하는 데 사용할 수 있는 무게중심 좌표를 사용할 수 있습니다 . 두 점(A와 B) 사이의 7/10 지점에 점을 배치하려면 를 사용합니다 \tkzDefBarycentricPoint(A=3,B=7)
.
\documentclass[margin=10pt]{standalone}
\usepackage{tkz-euclide}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\pgfmathsetmacro{\a}{39/7} % AC
\pgfmathsetmacro{\b}{41/7} % AB
\pgfmathsetmacro{\c}{50/7} % BC
\tkzDefPoints{0/0/B,\c/0/C}
\tkzInterCC[R](B,\b cm)(C,\a cm) \tkzGetFirstPoint{A}
\tkzDefPointWith[orthogonal normed](B,A) \tkzGetPoint{B1}
\draw[thin,blue,densely dashed](B) -- (B1);
\tkzDefPointWith[orthogonal normed,K=-1](A,B) \tkzGetPoint{A1}
\draw[thin,blue,densely dashed](A) -- (A1);
\tkzDefBarycentricPoint(A=3,A1=7)\tkzGetPoint{x}
\tkzDefBarycentricPoint(B=3,B1=7)\tkzGetPoint{y}
\draw[thin,Stealth-Stealth](x) -- node[above,sloped]{$41$}(y);
\fill[yellow!70] (B) -- (A) -- (C);
\tkzDrawPolygon[thick](A,B,C)
\end{tikzpicture}
\end{document}
답변2
\documentclass[margin=10pt]{standalone}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}
\pgfmathsetmacro{\a}{39/7} % AC
\pgfmathsetmacro{\b}{41/7} % AB
\pgfmathsetmacro{\c}{50/7} % BC
\tkzDefPoints{0/0/B,\c/0/C}
\tkzInterCC[R](B,\b cm)(C,\a cm) \tkzGetFirstPoint{A}
\tkzDefPointWith[orthogonal normed](B,A) \tkzGetPoint{B1}
\tkzDefPointWith[orthogonal normed,K=-1](A,B) \tkzGetPoint{A1}
\tkzDrawPolygon[thick,fill=yellow](A,B,C)
\tkzDrawPoints(A,B,C)
\tkzLabelPoints(B,C)
\tkzLabelPoints[above,right](A)
\tkzDrawSegment[dim={$41$,-15pt,above=4pt,font=\scriptsize,rotate=45}](A,B)
\end{tikzpicture}
\end{document}