|
- \coordinate[label=left:A] (A) at (0,0);
- \coordinate[label=left:B] (B) at (5,1);
- \coordinate[label=left:C] (C) at (1,1);
- \coordinate[label=left:D] (D) at (4,0);
- \draw [name path=AB] (A) -- (B);
- \draw [name path=CD] (C) -- (D);
- \path [name intersections={of = AB and CD}];
- \coordinate[label=above right:T] (T) at (intersection-1);
复制代码- \coordinate[label=left:A] (A) at (0,0);
- \coordinate[label=left:B] (B) at (2,1);
- \coordinate[label=left:C] (C) at (3,1);
- \coordinate[label=left:D] (D) at (4,0);
- \draw [name path=AB] (A) -- (B);
- \draw [name path=CD] (C) -- (D);
- \path [name intersections={of = AB and CD}];
- \coordinate[label=above right:T] (T) at (intersection-1);
复制代码 第一段代码因为线段是相交的,交点就画出来了,第二段代码直线相交但线段不相交,那个交点的位置就不正确了,我知道延长线段可以做到,但我觉得这样不通用,遇到不同的图形就要做不同的延长,特别是直线和曲线相交也不好弄,要想弄一个通用的方法应该怎么做呢? |
|