除了两条双曲线路径,我什么都能做。任何帮助我都感激不尽。
我有部分图片,这是我的代码:
\begin{figure}[h]
\centering
\begin{tikzpicture}
\draw (0,0) circle (2.5);
\draw (0,0) -- ({2.5*cos(45)},{2.5*sin(45)});
\draw (0,0) -- (2.5,0);
\draw ({2.5*cos(45)},-{2.5*sin(45)}) -- (-{2.5*cos(45)},{2.5*sin(45)});
\draw (0.5,0) arc (0:45:0.5);
\node[below left] at (0,0) {$O$};
\node[above left] at (-{2.5*cos(45)},{2.5*sin(45)}) {$D$};
\node[above right] at ({2.5*cos(45)},{2.5*sin(45)}) {$B$};
\node[below right] at ({2.5*cos(45)},-{2.5*sin(45)}) {$C$};
\node[right] at (2.5,0) {$\theta=0$};
\node[below left] at ({1.25*cos(45)},-{1.25*sin(45)}) {$r^0=\frac{\omega}{c}$};
\node[right] at ({0.5*cos(22.5)},{0.5*sin(45)}) {$\theta_B$};
\end{tikzpicture}
\end{figure}
答案1
嗯,变成了完全重写代码。无论如何,你仍然可以找出缺失部分所需的几位。我看到了 Przemysław Scherwentke 的评论,所以那些缺失的线被画成了圆段。
对绘图进行了一些参数化,并添加了一些注释。
\documentclass[tikz, border=3mm]{standalone}
\usetikzlibrary{calc,intersections,quotes,angles}
\begin{document}
\begin{tikzpicture}
% set up a few macros
\newcommand\circlerad{2.5cm}
\pgfmathsetmacro\Bangle{45}
\pgfmathsetmacro\Dangle{\Bangle-90}
\pgfmathsetmacro\Cangle{\Bangle+90}
% draw circle
\node [circle,draw,minimum size=2*\circlerad,name path=circ] (A) {};
% draw line to B and add named coordinate with label
\draw (A.center) coordinate[label=below left:$O$] (O)
-- (A.\Bangle) coordinate[label=above right:$B$] (b);
% ditto for horizontal line from origin
\draw [name path=h1] (O) -- (A.0) coordinate[label=right:{$\theta=0$}] (e);
% draw line from D to C, add labels and r^0 node
\draw (A.\Dangle) coordinate[label=below right:$D$] (d)
-- (A.\Cangle) coordinate[label=above left:$C$] (c)
node[below left,pos=0.25] {$r^0=\frac{\omega}{c}$};
% draw angle arc
\pic ["$\theta_B$",angle eccentricity=1.7,draw] {angle=e--O--b};
% draw hyperbolic arcs
\draw [name path=hypish] (d) arc[start angle=\Dangle-90,delta angle=-90,radius=\circlerad];
\draw (c) arc[start angle=\Cangle+90,delta angle=90,radius=\circlerad];
%find intersection of hyperbole and horizontal line, name coordinate i-1, and draw invisible
% verticle line from this point upwards
\path [name intersections={of=hypish and h1,name=i},overlay,name path=dashing] (i-1) -- ++(0,2*\circlerad);
% find intersection of invisible path and circle, draw line from to A
\draw [densely dashed,name intersections={of=dashing and circ,name=j}] (i-1) -- (j-1);
% label A
\node [below right,font=\footnotesize] at (i-1) {$A:(r_0,0)$};
\end{tikzpicture}
\end{document}
答案2
为了比较元帖子,包裹在luamplib
. 用 编译lualatex
。
\RequirePackage{luatex85}
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
beginfig(1);
path c, r[], h[];
pair A,B,C,D;
c = fullcircle scaled 160;
t = 45*8/360; % the diagram should work for values other than 45°
B = point t of c;
C = point t-2 of c;
D = point t+2 of c;
r0 = origin -- point 0 of c;
r1 = origin -- B;
r2 = origin -- C;
r3 = origin -- D;
h1 = B{-B} .. C{C};
h2 = B{-B} .. D{D};
A = r0 intersectionpoint h1;
draw r0; draw r1; draw r2; draw r3;
draw h1; draw h2;
draw c withcolor .67 blue;
draw fullcircle scaled 16 cutafter r1 withcolor .67 blue;
draw A -- A shifted 1000 up cutafter c
dashed evenly scaled 2/3
withcolor .53 red;
label.llft("$O$", origin);
label.rt("$\vartheta=0$", point 0 of c);
label("$\vartheta_B$", 16 right rotated 20);
label.lrt("$A:(r_0,0)$", A);
label.llft("$r^0=c/\omega$", 1/2 C);
label("$B$", 1.08 B);
label("$D$", 1.08 D);
label("$C$", 1.08 C);
endfig;
\end{mplibcode}
\end{document}
笔记:在几个地方,MP 代码取决于以原点为中心的圆。