如何定义两条线段AD与BC延长线的交点 F ?

2019-09-10 22:12发布

% MWE如下: %----如何定义两条线段AD与BC延长线的交点 F ? % %----xelatex编译 ``` \documentclass{article} \usepackage{xeCJ...

% MWE如下: %----如何定义两条线段AD与BC延长线的交点 F ? % %----xelatex编译 ``` \documentclass{article} \usepackage{xeCJK}%使用xeCJK中文处理宏包 \usepackage{amsmath,amssymb,bm}%ams数学符号 \usepackage{tikz} \usetikzlibrary{arrows,intersections} \usetikzlibrary{positioning,backgrounds} \usetikzlibrary{fadings} \usetikzlibrary{patterns} \usetikzlibrary{calc} \usetikzlibrary{shadings} \pgfdeclarelayer{background} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground} \usepackage{verbatim} \begin{document} \begin{tikzpicture}[scale=1.5,line width=0.75pt] %点A \coordinate (A) at (-1,0); \node[left] at (A) {$A$}; %点D \coordinate (D) at ([shift=(50:1.2cm)]A); \node[left] at (D) {$D$}; %点B \coordinate (B) at (1,0); \node[left] at (B) {$B$}; %点C \coordinate (C) at ([shift=(110:1.2cm)]B); \node[right] at (C) {$C$}; %失败尝试--定义直线AD与BC交点F \coordinate (F1) at ($(A)!2!0:(D)$); \coordinate (F2) at ($(B)!2!0:(C)$); \path[name path=x] (A)--(F1); \path[name path=y] (B)--(F2); \path[name intersections={of=x and y, name=i}] coordinate (F); \node[above] at (F) {$F$}; %失败尝试--定义直线AD与BC交点F %连线FAB \draw (F)--(A)--(B)--cycle; \end{tikzpicture} \end{document} ``` %======== 失败的运行效果图,如下: ![fail.png](/data/ueditor/php/upload/image/20190910/1568124721552773.png)
4条回答
TvZ8lPRVOT8C
2019-09-10 22:47
tkz-euclide包,专门绘制平面几何图形的包(原包是法语包),我的博客已经给出了很多例子 https://yuxtech.github.io/2019/07/14/平面几何绘图示例/ ```tex \documentclass[tikz]{standalone} \usepackage{tkz-euclide}%%%加载tkz-euclide包 \begin{document} \begin{tikzpicture}[inner sep=1pt] \tkzDefPoints{0/0/A,3/0/B,1/1/D,2/1/C} %%等价于\coordinate(A)at(0,0);\coordinate(B)at(3,0);..... \tkzInterLL(A,D)(B,C)\tkzGetPoint{F} %%定义直线AD与BC的交点,得到交点F \draw(A)node[below]{$A$}--(F)node[above]{$F$}--(B)node[below]{$B$}--cycle; \draw(C)node[above right]{$C$}(D)node[above left]{$D$}; \tkzDrawPoints[size=2,fill=blue](A,B,C,D,F) \end{tikzpicture} ```

一周热门 更多>