我正在尝试在 PGF 中绘制一个称为“Ossanna 圆圈”的东西。
这是我的 MWE。请原谅它的大小——您需要所有中间点才能获得我们所需的点:
\documentclass[a4paper,11pt,titlepage,preview=false,tikz=true,class=scrartcl]{standalone}
\usepackage[urw-garamond]{mathdesign}
\usepackage[T1]{fontenc}
\usepackage{amsmath} % amssymb ist schon in mathdesign enthalten
\usepackage{fontspec}
\setmainfont{GaramondNo8}
\usepackage[ngerman]{babel}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{calc,intersections,through,backgrounds}
\begin{document}
\begin{tikzpicture}[scale=1,domain=0:1]
\coordinate (O) at (0,0);
\coordinate (Un) at (0,193.55/50);
\coordinate (I0) at (90-85.6:12.5/10);
\coordinate (IK) at (180-122:133.53/10);
\draw[font=\normalsize,<-] (-0.1,0) -- (20,0) node(IM)[right=3pt] {\text Im}; %{$\text$}; imaginary axis
\draw[font=\normalsize,->] (0,-0.1) -- (0,20) node(RE)[above=2pt] {\text Re} ; % real axis
\draw[thick,color=blue,->] (O) -- (Un) node[above=2pt,left=2pt] {$\text U_n$}; % rated voltage
\draw[thick,color=red,->] (O) -- (I0) node[above=2pt,right=2pt] (Leerlaufstrom) {$\text I_0$}; % no-load current
\draw[thick,color=red,->] (O) -- (IK) node[above=2pt,right=2pt] (Kurzschlussstrom) {$\text I_k$}; % blocked rotor current
\draw[thin,dotted] (I0) -- (IK); % dotted line between tips of I_0 and I_K
\coordinate (S) at ($(I0)!.5!(IK)$); % point halfway between tips of I_0 and I_K, new point is called S
\coordinate (S0) at ($ (S) !1.5! 90:(IK) $); % new point S0, turned -90° from line between S and I_K and 1.5 times as long as I_K to S
\coordinate (S1) at ($ (S) !1.5! -90:(IK) $); % new point S1, turned -90° from line between S and I_K and 1.5 times as long as I_K to S
\coordinate (S2) at ($ (IK) !1! 58:(O) $); % new point S2, turned 58° from line between I_K and origin O and 1 times as long as I_K to O
\draw[thin,dotted] (S0) -- (S1); % dotted line between S0 and S1 (bisector)
\draw[thin,dotted] (IK) -- (S2); % dotted line between I_K and S2
\path[name path=S0--S1] (S0) -- (S1); % labeling of bisector path as S0--S1
\path[name path=IK--S2] (IK) -- (S2); % labeling of path I_K to S2 als IK--S2
\path[name intersections={of=S0--S1 and IK--S2,by={[label=left:M]M}}]; % definition of intersection of the two lines as M, with label
\fill[red] (M) circle (1.5pt); % drawing of point M as circle of diameter 1.5 pt, red fill
\node (KR) [name path=KRI,draw,thick,dotted,circle through=(IK)] at (M) {}; % Ossanna circle through tip of I_K with M as centre
\path[name path=IK--IM,draw,thin] (IK) -- (IK |- IM); % perpendicular from IK to the imaginary axis
\coordinate (P1) at ($ (IK |- IM) !0.5! (IK)$); % Power P1
\draw[thick,->] (IK |- IM) -- (P1) node[above=2pt,left=2pt] {$\text P_1$}; % P1 line
\path[name path=I0--P1,draw,thin] (I0) -- ($ (I0) !3! (P1) $); % path over I0 and P1 to circle
\path[name intersections={of=I0--P1 and KRI,by={[label=right:$\text S_\infty$]SINF}}]; % definition of intersection as S_infinity
\fill[black] (SINF) circle (1.5pt); % drawing of point S_infinity
\path[name path=O--RAND] ($ (0,0) !0.5! -20:(IM) $) -- ($ (0,0) !1! -20:(IM) $); % random line from origin
\path[name intersections={of=O--RAND and KRI,by={[label=right:$\text {Wow}$]RAND}}]; % "random" intersection of line and circle
\fill[green] (RAND) circle (1.5pt); % drawing of random point in green
\path[name path=RAND--SINF,draw,thin] (RAND) -- ($ (RAND) !1.25! (SINF) $); % line from random point to S_infinity
\node at (IK) [above=3pt,left=5pt] {$\text S_{\text I_k}$}; % labeling of S_IK
\fill[black] (IK) circle (1.5pt); % drawing of point S_IK
\path[name path=I0--RAND,draw,thin] (I0) -- (RAND); % drawing of line from random point to no-load current
\path[name path=RAND--IK,draw,thin] (RAND) -- ($ (RAND) !1.25! (IK) $); % line from random point to blocked rotor current
\end{tikzpicture}
\end{document}
结果如下:
这是我的挑战:我想画一条与 平行的线,该线与和RAND--SINF
相切,但这条线必须正好是 10 厘米(或单位)长。RAND--IK
RAND--I0
我怎样才能做到这一点?
答案1
正如 DJP 所说,tkz-euclide
这非常适合。它可以让您非常舒适地构建整个事物,并且可以轻松计算构建 10 厘米平行线所需的角度:
\documentclass[]{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{calc,intersections,through,backgrounds}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}[scale=1,domain=0:1]
% Define known points
\tkzDefPoint(0,0){O}
\tkzDefPoint(1,0){I}
\tkzDefPoint(0,1){R}
\tkzDefPoint(0,193.55/50){Un}
\tkzDefPoint(90-85.6:12.5/10){I0}
\tkzDefPoint(180-122:133.53/10){Ik}
% Draw lines (just for illustration, not needed for the construction)
\tkzDrawSegment[thick, red](O,Ik)
\tkzDrawSegment[thick, red](O,I0)
\tkzDrawLine[add=0 and 20](O,I)
\tkzDrawLine[add=0 and 20](O,R)
% Define points describing mediator of I0 and Ik, draw line for illustration
\tkzDefLine[mediator](I0,Ik) \tkzGetPoints{A}{B}
\tkzDrawLine[dashed, gray!50, add=-0.2 and 0](A,B)
% Define a point by rotating Ik--O by 58 degrees around O
\tkzDefPointBy[rotation=center Ik angle 58](O) \tkzGetPoint{C}
%Draw line for illustration
\tkzDrawLine[dashed, gray!50](Ik, C)
% Find intersection of Ik--C and A--B, save as M
\tkzInterLL(Ik,C)(A,B) \tkzGetPoint{M}
% Find projection of Ik onto imaginary axis, save as D
\tkzDefPointBy[projection=onto O--I](Ik) \tkzGetPoint{D}
% Find halfway point between D and Ik, save as P1
\tkzDefPointWith[linear,K=0.5](D,Ik) \tkzGetPoint{P1}
% Draw Ossanna circle for illustration
\tkzDrawCircle(M,Ik)
% Find Sinf as intersection between Ossanna circle
\tkzInterLC(I0,P1)(M,Ik) \tkzGetPoints{Sinf'}{Sinf}
% Random point
\tkzDefPoint(-20:1){RND}
% Find intersection between O--RND and Ossanna circle
\tkzInterLC(O,RND)(M,Ik) \tkzGetPoints{Wow}{Wow'}
% Mark angles that we need to measure for illustration
\tkzDrawSegments(Wow,Sinf Wow,I0 Wow,Ik)
\tkzMarkAngle(Ik,Wow,I0)
\tkzMarkAngle[size=1.5, fill=orange](Sinf,Wow,Ik)
\tkzLabelAngle(Ik,Wow,I0){$\gamma$}
\tkzLabelAngle[pos=1.5](Sinf,Wow,Ik){$\beta$}
% Measure and save angles
\tkzFindAngle(Ik,Wow,I0)
\tkzGetAngle{gamma}
\tkzFindAngle(Sinf,Wow,Ik)
\tkzGetAngle{beta}
% Calculate length \a in pt along Wow--I0 at which our slip line starts if we want it to be 10cm long
\pgfmathsetmacro\a{10cm * sin(\beta)/sin(\gamma)}
% Find point E at which the slip line starts
\tkzInterLC[R](Wow,I0)(Wow,\a pt) \tkzGetPoints{E'}{E}
% Find point F at which the slip line ends
\tkzInterLC[R](Wow,Ik)(E,10cm) \tkzGetPoints{F}{F'}
% Draw slip line
\tkzDrawSegment[ultra thick, blue](E, F)
% Show the equivalent angle beta for illustration
\tkzMarkAngle[size=1.5, fill=orange](E,F,Wow)
\tkzDrawPoints(O,Un,I0,Ik,P1,M, Sinf, Wow, E)
\tkzLabelPoints(O,Un,I0,Ik, M, P1, Sinf, Wow)
\end{tikzpicture}
\end{document}