苍鹭问题抽签

苍鹭问题抽签

我正在尝试绘制以下关于海伦问题的图 在此处输入图片描述

我不知道如何绘制角度和虚线。这是我的不完整代码。

\documentclass{standalone}

\usepackage[T1]{fontenc}

\usepackage[utf8]{inputenc}

\usepackage{lmodern}

\usepackage{
tikz,
}

\usetikzlibrary{
intersections,
calc
}

\begin{document}

\begin{tikzpicture}[font=\small]

\draw

(0,0) coordinate (A)

(1,1.435) coordinate (B)

(3,3) coordinate (C)

;
\draw[thick] (A) rectangle (C);

\draw[thick] (A)--(B) node[pos=0.6, inner sep=0pt, outer sep=0pt](x){x};

\draw[thick] ($(x)!0.5cm!90:(A)$) -- ($(x)!0.5cm!-90:(A)$);

\end{tikzpicture}

\end{document}

答案1

使用 很容易获得pstricks,更具体地说,使用其pst-eucl模块:

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

\begin{document}

\psset{linejoin=1, unit=1cm, MarkAngleRadius=0.6}
\begin{pspicture}(-1,-2.5)(5.5, 2.5)
\pstGeonode[PointSymbol=none, PosAngle={180,180,-90,90}](0,2.1){A}(0,-2.1){A1}(2.1,0){C}(3.5,1.4){B}
\pstGeonode[PointSymbol=none, PointName={$A'$,$B'$} ,PosAngle={150,30}](0,0){A0}(3.5,0){B0}
\psline(-1,0)(5.5,0)
\pstRightAngle{A}{A0}{C}
\pstMarkAngle{A}{C}{A0}{} \pstMarkAngle{B0}{C}{B}{}
\psline[linewidth=2pt](A)(C)(B)
\psset{SegmentSymbol=pstslashh}
\pstSegmentMark{A}{A0}
\psset{linestyle=dashed}
\pstSegmentMark{A0}{A1}
\psline(A1)(C)\psline(B)(B0)
\end{pspicture}

\end{document} 

在此处输入图片描述

答案2

\documentclass[margin=1cm]{standalone}
\usepackage{tkz-euclide}    
\begin{document}
\begin{tikzpicture}
 \tkzDefPoints{0/0/A',0/4/A,5/2/B,5/0/B'}
 \tkzDefPointBy[symmetry=center A'](A) \tkzGetPoint{A_1}
 \tkzInterLL(A_1,B)(A',B') \tkzGetPoint{C}
 \tkzDrawSegments[line width=2pt](A,C C,B)
 \tkzDrawLine(A',B')
 \tkzDrawSegments[dashed](A',A_1 A_1,C B,B')
 \tkzDrawSegment(A,A')
 \tkzLabelPoints[above right](B,B')
  \tkzLabelPoints(C)
 \tkzLabelPoints[above left](A',A_1,A)
 \tkzMarkSegments[mark=s||](A,A' A',A_1)
 \tkzMarkRightAngle(C,A',A)
 \tkzMarkAngles(A,C,A' B',C,B)
\end{tikzpicture}   
\end{document}

在此处输入图片描述

答案3

试试这个代码:

\documentclass[border=.5cm]{standalone}

\usepackage{tikz}

\def\centerarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
    \draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
\begin{document}
    
    \begin{tikzpicture}[font=\small]
        \draw (0,3) coordinate (A) node[left] () {$A$};
        \draw (3.5,2) coordinate (B) node[above] () {$B$};  
        \draw[very thin] (0,0) rectangle (.2,.2);
        \draw (0,0) node[below left] () {$A'$};
        \draw (0,-3) node[left] () {$A_1$};
        \draw (2.1,0) node[below] () {$C$};
        \draw[thin] (-2,0)--(5,0);
        \draw[blue,thick,pos=.5,-latex] (A)--(2.1,0);
        \draw[dashed] (A)--(0,-3);
        \draw[dashed] (0,-3)--(3.5,2);
        \draw[blue,thick,pos=.5,-latex] (2.1,0)--(3.5,2);
        \centerarc[thick,red](2.1,0)(125:180:.5);
        \centerarc[thick,red](2.1,0)(55:0:.5);
    \end{tikzpicture}
    
\end{document}

输出:

在此处输入图片描述

相关内容