我无法用蓝色填充 alpha 角

我无法用蓝色填充 alpha 角

我尝试用蓝色填充 A、B、C 之间的角度,但即使我编写了代码,它也无法填充。

\documentclass[10pt]{article}
\usepackage{pgfplots}
\usepackage{amsmath}
\usepackage{graphicx}  
\usepackage{textcomp}
\usepackage{mathtools} 
\usepackage{xcolor}
\usepackage{tabularx} 
\usepackage{pstricks-add}
\usepackage{pgfplots} 
\usepackage{background}
\usepackage{tkz-euclide}
\usepgfplotslibrary{fillbetween}
\pgfplotsset{compat=1.15}
\begin{document}
\begin{tikzpicture}[scale=0.4]
\tkzDefPoint(-8,4){A},
\tkzDefPoint(-7.07,10.43){B},
\tkzDefPoint(1.1,4.01){C},
\tkzDrawPoints(A,B,C)
\tkzLabelPoints[below](A)
\tkzLabelPoints[above](B)
\tkzLabelPoints[above](C)
\tkzLabelSegment[left,font=\footnotesize](A,B){$6,5$}
\tkzLabelSegment[below,font=\footnotesize](A,C){$9,1$}
\tkzLabelSegment[right,font=\footnotesize](B,C){$10,4$}
\draw[thick,black](-8,4)--(-7.08,10.43)--(1.1,4.01)--cycle;
\tkzMarkAngle[fill= blue!40,size=1.4cm,opacity=.5](A,B,C)
\tkzLabelAngle[pos=0.8](A,B,C){$\alpha$}
\end{tikzpicture}
\end{document}

答案1

\documentclass[tikz, border=1cm]{standalone}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}[scale=0.4]
\tkzDefPoint(-8,4){A},
\tkzDefPoint(-7.07,10.43){B},
\tkzDefPoint(1.1,4.01){C},
\tkzDrawPoints(A,B,C)
\tkzLabelPoints[below](A)
\tkzLabelPoints[above](B)
\tkzLabelPoints[above](C)
\tkzLabelSegment[left,font=\footnotesize](A,B){$6,5$}
\tkzLabelSegment[below,font=\footnotesize](A,C){$9,1$}
\tkzLabelSegment[right,font=\footnotesize](B,C){$10,4$}
\draw[thick,black](-8,4)--(-7.08,10.43)--(1.1,4.01)--cycle;
\tkzMarkAngle[size=1.4cm,opacity=.5](A,B,C)
\tkzFillAngle[fill= blue!40,size=1.4cm,opacity=.5](A,B,C)
\tkzLabelAngle[pos=0.8](A,B,C){$\alpha$}
\end{tikzpicture}
\end{document}

ABC 角填充的三角形

答案2

由于您加载了一个pstricks模块,这里有一个简短的代码来执行它pst-eucl,它定义了一个绘制三角形的命令,给定一个顶点和三条边的长度(\pstTriangleSSS):

 \documentclass[border=6pt, svgnames]{standalone}
 \usepackage{pst-eucl}%

\begin{document}

    \begin{pspicture}(-0.5,-0.5)(9, 7)%
    \psset{linejoin=1}
    \pstGeonode[PosAngle=-90](0,0){A}
    \pstTriangleSSS[PosAngle={-90,90}]{A}(10.4, 6.5, 9.1){C}{B}
    \pstMarkAngle[LabelSep=0.5, MarkAngleRadius=0.8, fillstyle=solid, fillcolor=Lavender, linewidth=0.4pt] {A}{B}{C}{$\alpha$}
    \psset{labelsep=2pt,nrot=:U}
    \pcline(A)(B)\naput{6,5}
    \pcline(B)(C)\naput{10,4}
    \pcline(A)(C)\nbput{9,1}
    \end{pspicture}

\end{document} 

在此处输入图片描述

相关内容