帮我如何在 tikz 中绘制这张图片?

帮我如何在 tikz 中绘制这张图片?

帮我如何在 tikz 中绘制这幅图?在此处输入图片描述

答案1

我建议使用专门的软件包来制作这种类型的图画,tkz-euclide 包,它具有面向几何计算的非常有用的命令。

这是代码。

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% By J. Leon V.  coded based on the BSD, MIT, Beerware licences.
\documentclass[border=2mm]{standalone}
\usepackage{xcolor}
\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}
    \begin{tikzpicture}

    % Set limits.
        \tkzInit[xmax=5,xmin=-5,ymax=5, ymin=-5]
    %   \tkzGrid[sub,color=blue!10!,subxstep=.5,subystep=.5]
        \tkzClip
    %Define principal points.
        \tkzDefPoint(-0.5,4){A} 
        \tkzDefPoint(1,-4){K}
        \tkzDefPoint(-2,0){B}
        \tkzDefPoint(2,0){C}

    %Estimate the E position in the line AK
        \tkzDefBarycentricPoint(A=9,K=3.5) \tkzGetPoint{E}
    %Find the point D from the intersection of the lines AK and BC
        \tkzInterLL(A,K)(B,C) \tkzGetPoint{D}
        %Find the center of the circumscrit cirble from KBC and obtain the radius.
        \tkzDefCircle[circum](K,B,C)
        \tkzGetPoint{O} \tkzGetLength{rC}
        % Find the intersections between line AK and Circle OC , can be OB, OK
        \tkzInterLC(A,K)(O,C) \tkzGetPoints{F}{G}

    % Draw all the angles
    \tkzMarkAngle[fill=blue!25,mkpos=.2, size=0.5](B,A,E)
    \tkzMarkAngle[fill=blue!25,mkpos=.2, size=0.5](E,B,A)
    \tkzMarkAngle[fill=blue!25,mkpos=.2, size=0.5](A,C,E)
    \tkzMarkAngle[fill=blue!25,mkpos=.2, size=0.5](C,K,D)
    \tkzMarkAngle[fill=green!25,mkpos=.2, size=0.5](E,A,C)
    \tkzMarkAngle[fill=green!25,mkpos=.2, size=0.5](D,K,B)
    \tkzMarkAngle[fill=green!25,mkpos=.2, size=0.5](D,B,F)
    \tkzMarkAngle[fill=green!25,mkpos=.2, size=0.5](F,C,D)
    % Draw all the segments in one line.
        \tkzDrawSegments[thick](A,K B,C K,B K,C B,A A,C B,E E,C B,F F,C)
        % Draw the circumscrit circle from BCK
        \tkzDrawCircle[R,blue](O,\rC pt)

    % Draw specific points.
        \tkzDrawPoints[fill=white,size=7pt](O,D,E,F,B,C)

    %create labels
        \tkzLabelPoints[color=blue,opacity=.5,above](A,O) %reference points.
        \tkzLabelPoints[color=blue,opacity=.5,below](K) %reference points.
        \tkzLabelPoints[color=blue,opacity=.5,above right=-1pt](D,E,F) %reference points.
        \tkzLabelPoints[color=blue,opacity=.5,left](B) %reference points.
        \tkzLabelPoints[color=blue,opacity=.5,right](C) %reference points.

%    % You can label the angles.
        \tkzLabelAngle[pos = .7](B,A,E){\scriptsize 1}
        \tkzLabelAngle[pos = .7](A,B,E){\scriptsize 1}
        \tkzLabelAngle[pos = .9](A,C,E){\scriptsize 1}
        \tkzLabelAngle[pos = .7](D,K,C){\scriptsize 1}
        \tkzLabelAngle[pos = .7](F,B,D){\scriptsize 2}
        \tkzLabelAngle[pos = .7](B,K,D){\scriptsize 2}
        \tkzLabelAngle[pos = .7](F,C,D){\scriptsize 2}
        % You can mark the segments
        \tkzMarkSegments[mark=||](B,E A,E)
        \tkzMarkSegments[mark=o,size=2pt](B,F F,C)

    \end{tikzpicture}
\end{document}

结果如下。 在此处输入图片描述

答案2

很高兴你没有要求计算,只要求图片。

\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{intersections,calc,positioning}
\begin{document}
\def\angleC{50}
\begin{tikzpicture}[thick]
\draw (0,0) coordinate (O) circle (5);
\coordinate[label=above right:$C$] (C) at (\angleC:5);
\coordinate[label=above left:$B$] (B) at ({180-\angleC}:5);
\coordinate[label=above right:$F$] (F) at (90:5);
\coordinate[label=below:$K$] (K) at (-90:5);
\draw [name path=FK] (F) -- (K);
\draw [name path=BC] (B) -- (C);
\coordinate[name intersections={of=BC and FK, by=D}];
\node[right=1mm of D,yshift=3mm] {$D$};
\begin{pgfinterruptboundingbox}
\path[name path=aux1] (C) -- ++({90+\angleC}:10);
\path[name path=aux2] (B) -- ++({90-\angleC}:10);
\coordinate[name intersections={of=aux1 and aux2, by=E}];
\end{pgfinterruptboundingbox}
\node[right=1mm of E,yshift=3mm] {$E$};
\draw (B) -- (E) (C) -- (E) (B) -- (F) (C) -- (F);
\begin{pgfinterruptboundingbox}
\path[name path=aux3] let \p0 = (F), \p1 = (B), \n1={atan2(\y0-\y1,\x0-\x1)}, 
 \p2 = (E), \n2={atan2(\y2-\y1,\x2-\x1)} in
 (B) -- ++({\n1+\n2}:15);
\path[name path=aux4] let \p0 = (F), \p1 = (C), \n1={atan2(\y0-\y1,\x0-\x1)}, 
 \p2 = (E), \n2={atan2(\y2-\y1,\x2-\x1)} in
 (C) -- ++({\n1+\n2+180}:15);
\coordinate[name intersections={of=aux3 and aux4, by=A}];
\end{pgfinterruptboundingbox}
\node[right=1mm of A,yshift=3mm] {$A$};
\draw (K) -- (B) -- (A) (K) -- (C) -- (A) (F) -- (A);
% 
\path let \p0 = (B), \p1 = (K), \n1={atan2(\y0-\y1,\x0-\x1)}, 
 \p2 = (F), \n2={atan2(\y2-\y1,\x2-\x1)} in
\pgfextra{\typeout{\n1,\n2}};
%
\path let \p0 = (D), \p1 = (B), \n1={atan2(\y0-\y1,\x0-\x1)}, 
 \p2 = (F), \n2={atan2(\y2-\y1,\x2-\x1)} in
\pgfextra{\typeout{\n1,\n2}};
%
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容