線條未如預期相切

線條未如預期相切

我有兩個以繪製為中心的同心圓O。大圓的弦LMMN與小圓在S和 處相切Tangle{SOM}和的尺寸angle{TOM}一致且尺寸為 80 度。根據點冪定理,若小圓的半徑為r|OM| = r + x、 和|MS| = |MT| = y

y² = x(x + 2r)

所以,如果r = 3/4x = 3/2, y = (3*sqrt{2})/2.因為triangle{LOM}全等triangle{NOM},OM平分angle{M}

angle{LMO} = angle{SMO} = 180 - (80 + 90) = 10,

angle{NMO} = angle{TMO} = 180 - (80 + 90) = 10

我將所有這些都編碼在下TikZ圖中。為什麼弦不與S和處的小圓相切T

\documentclass{amsart}
\usepackage{tikz}

\usetikzlibrary{calc,intersections}


\begin{document}

\begin{tikzpicture}

%Two concentric circles are drawn.
%
\coordinate (O) at (0,0);
\draw[fill] (O) circle (1.5pt);
\draw (O) circle (3/4);
\draw (O) circle (9/4);
%
\coordinate (S) at (100:3/4);
\draw[fill] (S) circle (1.5pt);
\coordinate (T) at (-100:3/4);
\draw[fill] (T) circle (1.5pt);
%
\coordinate (M) at (-9/4,0);
%
\coordinate (L) at ($(M) +(20:{3*sqrt(2)})$);
\coordinate (N) at ($(M) +(-20:{3*sqrt(2)})$);
%
\draw (M) -- (L);
\draw (M) -- (N);

%The labels for the points are typeset.
\path node[anchor=west, inner sep=0, font=\footnotesize] at ($(O) +(0.15,0)$){$O$};
\path node[anchor=east, inner sep=0, font=\footnotesize] at ($(M) +(-0.15,0)$){$M$};
\path node[anchor={20+180}, inner sep=0, font=\footnotesize] at ($(L) +(20:0.15)$){$L$};
\path node[anchor={-20+180}, inner sep=0, font=\footnotesize] at ($(N) +(-20:0.15)$){$N$};
\path node[anchor={80-180}, inner sep=0, font=\footnotesize] at ($(S) +(80:0.15)$){$S$};
\path node[anchor={-80+180}, inner sep=0, font=\footnotesize] at ($(T) +(-80:0.15)$){$T$};

\end{tikzpicture}

\end{document}

在此輸入影像描述

答案1

如果您想要切線,則角度 SOM 和 TOM 的起始幻數 80° 是錯誤的。透過查看在切點 S 處具有正交角的三角形 OSM 可以輕鬆計算出該角度(結果約為 70.5°)。

另外,我也會將 L 和 N 的座標計算為以原點 O 為極座標。

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}

\pgfmathsetmacro\BigRadius{9/4}
\pgfmathsetmacro\SmallRadius{3/4}
% \Angle is the angle part of the polar coordinate of S with origin O
% 180 - acos(\SmallRadius/\BigRadius} = 109.47102
\pgfmathsetmacro\Angle{180 - acos(1/3)}
\pgfmathsetmacro\AngleTwo{2*\Angle - 180}

% Coordinates
\path
  coordinate (O) at (0, 0)
  coordinate (S) at (\Angle:\SmallRadius)
  coordinate (T) at (-\Angle:\SmallRadius)
  coordinate (M) at (-\BigRadius, 0)
  coordinate (L) at (\AngleTwo:\BigRadius)
  coordinate (N) at (-\AngleTwo:\BigRadius)
;

% Two concentric circles and lines
\draw[line join=bevel]
  (O) circle[radius=\SmallRadius]
  (O) circle[radius=\BigRadius]
  (L) -- (M) -- (N)
;

% Points
\fill[radius=1.5pt]
  \foreach \p in {O, S, T, M, L, N} { (\p) circle[] }
;

% The labels
\path[inner sep=0pt, node font=\footnotesize]
  node[anchor=west] at ($(O) +(0.1,0)$){$O$}
  node[anchor=east] at ($(M) +(-0.15,0)$){$M$}
  node[anchor={\AngleTwo+180}] at ($(L) +(20:0.15)$){$L$}
  node[anchor={-\AngleTwo+180}] at ($(N) +(-20:0.15)$){$N$}
  node[anchor={\Angle-180}] at ($(S) +(80:0.15)$){$S$}
  node[anchor={-\Angle+180}] at ($(T) +(-80:0.15)$){$T$}
;
\end{tikzpicture}
\end{document}

結果

給定大半徑和角度

小半徑可以用直角三角形MSO計算。因為上面的例子使用了宏,所以只需要改變\Angle和的宏定義:\SmallRadius

\def\Angle{100}
\pgfmathsetmacro\BigRadius{9/4}
% \Angle is the angle part of the polar coordinate of S with origin O
% Then the small radius can be calculated:
% \SmallRadius = \BigRadius * cos(180 - \Angle) = 0.3907
\pgfmathsetmacro\SmallRadius{\BigRadius * cos(180 - \Angle)}
\pgfmathsetmacro\AngleTwo{2*\Angle - 180}

角度 100 的結果

答案2

這是我的帖子中程式碼的編輯版本。我修正了 Heiko Oberdiek 發現的計算錯誤。

\documentclass{amsart}
\usepackage{tikz}

\usetikzlibrary{calc,intersections}


\begin{document}


\begin{tikzpicture}

%Two concentric circles are drawn. $\angle{LMN}$ is an angle inscribed in the bigger circle; its measure is
%20 degrees. The chords are tangent to the smaller circle at S and T. $\triangle{OSM}$ and $\triangle{OTM}$
%are congruent, right triangles. So, OM bisects $\angle{LMN}$, and $\angle{LMO}$ and $\angle{NMO}$ both
%have measure 10 degrees.
%
%r is the radius of the smaller circle. According to the Law of Sines, |OM| = r/sin(10). By the Pythagorean Theorem,
%|MS| = |MT| = (r/sin(10))sqrt{1-sin^{2}(10)} = r*cot(10).
%
\coordinate (O) at (0,0);
\draw[fill] (O) circle (1.5pt);
\draw (O) circle (1);
\draw (O) circle ({cot(10)});
%
\coordinate (S) at (100:1);
\draw[fill] (S) circle (1.5pt);
\coordinate (T) at (-100:1);
\draw[fill] (T) circle (1.5pt);
%
\coordinate (M) at ({-cot(10)},0);
%
\coordinate (L) at ($(M) +(10:{2*cot(10)})$);
\coordinate (N) at ($(M) +(-10:{2*cot(10)})$);
%
\draw (M) -- (L);
\draw (M) -- (N);

%The labels for the points are typeset.
\path node[anchor=west, inner sep=0, font=\footnotesize] at ($(O) +(0.15,0)$){$O$};
\path node[anchor=east, inner sep=0, font=\footnotesize] at ($(M) +(-0.15,0)$){$M$};
\path let \p1=($(L)-(M)$), \n1={atan(\y1/\x1)} in node[anchor={\n1+180}, inner sep=0, font=\footnotesize] at ($(L) +({\n1}:0.15)$){$L$};
\path let \p1=($(M)-(N)$), \n1={atan(\y1/\x1)} in node[anchor={\n1+180}, inner sep=0, font=\footnotesize] at ($(N) +({\n1}:0.15)$){$N$};
\path node[anchor={80-180}, inner sep=0, font=\footnotesize] at ($(S) +(80:0.15)$){$S$};
\path node[anchor={-80+180}, inner sep=0, font=\footnotesize] at ($(T) +(-80:0.15)$){$T$};

\end{tikzpicture}

\end{document}

在此輸入影像描述

相關內容