如何定义两条线段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条回答
小白菜
2019-09-30 22:12
%----当两条线段无交点,但所在直线有交点时,如何定义两条线段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} \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$}; \coordinate[label=above:$G$] (G) at (intersection of A--D and B--C); \draw (G)--(A)--(B)--cycle; \end{tikzpicture} \end{document}

一周热门 更多>