
나는 Cal 라이브러리로 그림을 그리는 방법을 알고 있습니다.
- 주어진 길이의 수직선
- 한 점을 지나는 수직선
- 한 점을 통과하는 임의의 각도의 선
아직 발견하지 못한 다른 가능성이 있는 걸까요?
\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}