![计算库定位点或线的所有可能性有哪些?](https://linux22.com/image/462278/%E8%AE%A1%E7%AE%97%E5%BA%93%E5%AE%9A%E4%BD%8D%E7%82%B9%E6%88%96%E7%BA%BF%E7%9A%84%E6%89%80%E6%9C%89%E5%8F%AF%E8%83%BD%E6%80%A7%E6%9C%89%E5%93%AA%E4%BA%9B%EF%BC%9F.png)
我知道如何使用 calc 库进行绘图
- 给定长度的垂直线
- 通过某一点的垂直线
- 通过一点的任意角度的线
还有什么其他可能性我还没发现吗?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,positioning}
\begin{document}
Une ligne perpendiculaire à une autre de longueur imposée.
A perpendicular line of given length
\begin{tikzpicture}
[dot/.style={circle,inner sep=1pt,fill,label={#1},name=#1},
extended line/.style={shorten >=-#1,shorten <=-#1},
extended line/.default=1cm]
\node [dot=A] at (0,0) {};
\node [dot=B] at (3,1) {};
\draw (A) -- (B)node[dot=C, pos=0.3] (C){} node[dot=D, pos=0.7] (D){};
\draw[red] (C) -- ($(C)!1cm!90:(A)$);
\draw (A) -- (B)node[dot=C, pos=0.3] (C){};
\draw[blue] (D) -- ($(D)!1cm!90:(B)$);
\end{tikzpicture}
Une ligne perpendiculaire passant par un point.
A perpendicular line passing through a point
\begin{tikzpicture}[dot/.style={circle,inner sep=1pt,fill,label={#1},name=#1},
extended line/.style={shorten >=-#1,shorten <=-#1},
extended line/.default=1cm]
\node [dot=A] at (0,0) {};
\node [dot=B] at (3,1) {};
\node [dot=P] at (1.9,-1.6) {};
\draw [extended line=0.5cm] (A) -- (B);
\draw ($(A)!(P)!(B)$) -- (P);
\fill [red] ($(A)!(P)!(B)$) circle [radius=2pt];
\end{tikzpicture}
Une ligne avec un angle quelconque de longueur imposée.
A line of any angle passing through a point of imposed length
\begin{tikzpicture}
[dot/.style={circle,inner sep=1pt,fill,label={#1},name=#1},
extended line/.style={shorten >=-#1,shorten <=-#1},
extended line/.default=1cm]
\node [dot=A] at (0,0) {};
\node [dot=B] at (3,1) {};
\draw (A) -- (B)node[dot=C, pos=0.3] (C){} node[dot=D, pos=0.7] (D){};
\draw[red] (C) -- ($(C)!1cm!45:(A)$);
\draw[blue] (D) -- ($(D)!2cm!30:(B)$);
\draw[blue] (D) -- ($(D)!2cm!-60:(B)$);
\end{tikzpicture}
\end{document}