在使用tikz的intersections library的时候产生了一个疑问,如果有两个以上的交点时,这些交点的顺序TikZ是如何判断的,比如下面代码的例子,此时intersection-1是上面的那个点,而换成intersection-2就是下面的那个点,这是如何判断的? 非常感谢!
\documentclass[a4paper]{ctexart} \usepackage[textwidth=17cm,textheight=26cm,left=2cm,top=1.5cm]{geometry}%页面尺寸设置 \usepackage{tikz}%调用tikz宏包作图 \usetikzlibrary{intersections}%应用此 library 找到两条曲线的交点 \usetikzlibrary{calc}%in order to use the coordinate calculation functions \usetikzlibrary{through}%this library defines keys for creating shapes that go through given points \usetikzlibrary{backgrounds}%背景 \begin{document} \begin{figure}[!h]\centering \begin{tikzpicture} \coordinate[label=left:\textcolor{red}{$ A $}] (A) at(0,0); \coordinate[label=right:\textcolor{red}{$ B $}] (B) at(1.25,.25); \draw (A)--(B); \node [name path=D,draw,circle through=(B),label=left:\textcolor{red}{$ D $}] at (A){}; \node [name path=E,draw,circle through=(A),label=right:\textcolor{red}{$ E $}] at (B){}; \path[name intersections={of=D and E}]; \coordinate[label=above:$ C $] (C) at (intersection-1); \draw[red] (A)--(C); \draw[red] (B)--(C); \end{tikzpicture} \end{figure} \end{document}