答案1
也许是这样的:
\documentclass[tikz, border=10pt]{standalone}
\usetikzlibrary{calc, intersections}
\begin{document}
\begin{tikzpicture}[
coordinate/.style={
circle, fill, inner sep=2pt
},
blue
]
\coordinate[coordinate, label={60:$p_1$}] (P1) at (-2.5,0.75);
\coordinate[coordinate, label={60:$p_2$}] (P2) at (-1.5,-0.75);
\coordinate[coordinate, label={120:$q_1$}] (Q1) at (2.5,0.75);
\coordinate[coordinate, label={120:$q_2$}] (Q2) at (1.5,-0.75);
\draw[name path=L1] ($(P1)!-0.5!(P2)$) node[above] {$l$} -- ($(P1)!3!(P2)$);
\draw[name path=L2] ($(Q1)!-0.5!(Q2)$) node[above] {$l'$} -- ($(Q1)!3!(Q2)$);
\coordinate[coordinate, gray, label={[gray]0:$z$}] (Z1) at ($(P1)!0.5!(P2)$);
\coordinate[coordinate, gray, label={[gray]180:$z$}] (Z2) at ($(Q1)!0.5!(Q2)$);
\node[name intersections={of=L1 and L2, by=Y}, coordinate, label={270:$y$}] at (Y) {};
\draw ($(P1)!-0.25!(Q1)$) -- ($(P1)!1.25!(Q1)$) node[above] {$\overline{p_{1}q_{1}}$}
($(P2)!-0.5!(Q2)$) -- ($(P2)!1.5!(Q2)$) node[below] {$\overline{p_{2}q_{2}}$};
\draw[gray] ($(P1)!1.25!(Q1)$) to[out=0, in=0] (Z2) to[out=0, in=0] ($(P2)!1.5!(Q2)$)
($(P2)!-0.5!(Q2)$) to[out=180, in=180] (Z1) to[out=180, in=180] ($(P1)!-0.25!(Q1)$);
\end{tikzpicture}
\end{document}
答案2
这是另一种方法元帖子以供比较。
这是通过使用 编译以下源代码生成的lualatex
。我添加了注释以尝试解释该方法。
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
beginfig(1);
% start with the two lines
path ell, ell';
ell = (20 down -- 144 up) rotated 32;
ell' = ell reflectedabout(up, down);
% draw them and label the intersection at the origin
draw ell; draw ell';
dotlabel.rt("$y$", origin);
label.top("$\ell$", point 1 of ell);
label.top("$\ell'$", point 1 of ell');
% now define two sets of points along each line
pair p[], q[];
p1 = point 3/4 of ell;
q1 = point 3/4 of ell';
p2 = point 3/8 of ell;
q2 = point 3/8 of ell';
% p3, q3 are the midpoints
p3 = 1/2[p1, p2];
q3 = 1/2[q1, q2];
% and now some points shifted off to the sides..
p11 = p1 shifted 30 left;
p12 = (xpart p11, ypart p2);
p13 = (xpart p11, ypart p3);
q11 = q1 shifted 40 right;
q12 = (xpart q11, ypart q2);
q13 = (xpart q11, ypart q3);
% draw the loop through all these points using the "Hobby" syntax
draw q12 {right} .. {left} q13 -- q3 -- q13 {right} .. {left} q11 --
p11 {left} .. {right} p13 -- p3 -- p13 {left} .. {right} p12 --
cycle;
% note that drawing `q11 -- p11` goes through q1 and p1
% because of the way they were defined above,
% add the remaining labels
label.ulft("$\overline{p_1 q_1}$", q11);
label.ulft("$\overline{p_2 q_2}$", q12);
dotlabel.llft("$p_1$", p1);
dotlabel.llft("$p_2$", p2);
dotlabel.lrt("$q_1$", q1);
dotlabel.lrt("$q_2$", q2);
dotlabel.rt("$z$", p3);
dotlabel.lft("$z$", q3);
endfig;
\end{mplibcode}
\end{document}