我画了一个圆圈帕普斯链在 arbelos 上。如何绘制其他圆圈?
\documentclass[10pt]{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage[x11names]{xcolor}
\usepackage{fouriernc}
\usepackage{tikz}
\usetikzlibrary{calc,intersections}
\begin{document}
\centering
\begin{tikzpicture}[scale=1.5,line join=round,font=\small]
\coordinate[label=below:$A$] (A) at (0,0);
\coordinate[label=below:$B$] (B) at (4,0);
\coordinate[label=below:$C$] (C) at (6,0);
\draw[thick,lightgray](0,0)--(6,0);
\draw[Burlywood4,thick]
(6,0) arc [radius=3, start angle=0, delta angle=180] --
(0,0) arc [radius=2, start angle=180, delta angle=-180]--(4,0) arc [radius=1, start angle=-180, delta angle=-180]--cycle;
\path[name path=b1]
(6,0) arc [radius=3, start angle=0, delta angle=180];
\path[name path=b2] (0,0) arc [radius=2, start angle=180, delta angle=-180];
\path[name path=b3] (4,0) arc [radius=1, start angle=-180, delta angle=-180];
\draw[olive!50,name path=b4] (4,0) arc (225:60:{sqrt(2)});
\draw[violet!50,name path=b5] (4,4) arc (45:-40:{2*sqrt(2)});
\path [name intersections={of = b4 and b5, by={D}}];
\path [name intersections={of = b2 and b4, by={T,E}}];
\path [name intersections={of = b3 and b5, by={F}}];
\coordinate (K) at ($(E)!.5!(F)$);
\coordinate (L) at ($(D)!.5!(F)$);
\coordinate (M) at ($(K)!1cm!90:(F)$);
\coordinate (N) at ($(L)!1cm!90:(D)$);
\path[name path=g1] (K)--(M);
\path[name path=g2] (L)--(N);
\path [name intersections={of = g1 and g2, by={O}}];
\draw[thick,Red4]
let
\p1=( $(E)-(O) $ )
in
(O) circle ({veclen(\x1,\y1)});
\foreach \p in {D,E,F,O}
\draw[fill,DodgerBlue4] (\p) circle(1pt);
%\foreach \p in {D,E,F}
%\node[above] at (\p) {$\p$};
\end{tikzpicture}
\end{document}
答案1
使用链接中提供的坐标:
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\newcommand\RadiiBig{4}
\newcommand\RadiiSmall{3}
\begin{document}
\begin{tikzpicture}
\coordinate[label=below:A](A) at (0,0);
\coordinate[label=below:B](B) at (\RadiiBig*2,0);
\coordinate[label=below:C](C) at (\RadiiSmall*2,0);
\pgfmathsetmacro{\r}{\RadiiSmall/\RadiiBig}
\draw[gray!50]($(A)+(-1,0)$)--($(B)+(1,0)$);
\draw(\RadiiBig,0) circle (\RadiiBig);
\draw(\RadiiSmall,0) circle (\RadiiSmall);
%
\draw ($(C)+(\RadiiBig-\RadiiSmall,0)$) circle (\RadiiBig-\RadiiSmall);
\foreach \n in {1,...,15}{%
\pgfmathsetmacro{\denom}{\n*\n*(1-\r)*(1-\r)+\r}
\pgfmathsetmacro{\x}{2*\RadiiBig*\r*(1+\r)/(2*\denom)}
\pgfmathsetmacro{\y}{2*\RadiiBig*\n*\r*(1-\r)/\denom}
\pgfmathsetmacro{\Radn}{2*\RadiiBig*\r*(1-\r)/(2*\denom)}
\draw(\x,\y) circle (\Radn);
\draw(\x,-\y) circle (\Radn);
}
\end{tikzpicture}
\end{document}
编辑
按照 Thruston 的想法,将圆反转应用于 Tikz。使用点 P 通过 AP*AP'=r^2 反转为 P' 的定义,其中 r 是镜像圆,我得到了以下结果。我只做了一个反转点的函数,因此圆的镜像中心必须从中得出。
\begin{tikzpicture}[
declare function={CircInv(\APp,\r)=\r*\r/\APp;}
]
\coordinate[label=below:A](A) at (0,0);
\coordinate[label=below:B](B) at (\RadiiBig*2,0);
\coordinate[label=below:C](C) at (\RadiiSmall*2,0);
\pgfmathsetmacro{\Rp}{\RadiiBig-\RadiiSmall}%% R'
\pgfmathsetmacro{\r}{2*\RadiiBig}%% r: mirror circle
\pgfmathsetmacro{\R}{(CircInv(2*\RadiiSmall,\r)-\r)/2}%% R: Mirror image of first circle
\coordinate[label=below:$P'$](Pp) at ($(C)+(\Rp,0)$);%% Center first circle
\coordinate[label=below:$P$](P) at ($(B)+(\R,0)$);%% Center of mirror circle of first circle
%%
\draw[gray!50]($(A)+(-1,0)$)--($(B)+(3,0)$);
\draw(\RadiiBig,0) circle (\RadiiBig);
\draw(\RadiiSmall,0) circle (\RadiiSmall);
\draw[red](A) (-20:\r) arc (-20:50:\r);\draw[red](A) -- +(-15:\r) node[pos=0.5,anchor=south]{$r$};
\draw[blue](Pp) circle (\Rp);\draw[blue] (Pp) -- +(45:\Rp) node[pos=0.5,anchor=south east]{$R'$};
\draw[gray](P) circle (\R);\draw[gray] (P) -- +(45:\R) node[pos=0.5,anchor=south east]{$R$};
%%
\foreach \n in {1,2}{%% First loop showing the column circles
\pgfmathsetmacro{\alpha}{atan(2*\n*\R/(\r+\R))}
\pgfmathsetmacro{\X}{2*\n*\R/sin(\alpha)}%% Length from (A) to center of circle
\pgfmathsetmacro{\Rpn}{(CircInv(\X-\R,\r)-CircInv(\X+\R,\r))/2}%% Size of mirror circle
\pgfmathsetmacro{\Y}{CircInv(\X+\R,\r)+\Rpn}%% Length (A to center mirror circle
\draw[gray](A) -- (\alpha: \X);
\draw[gray](P |- {(0,2*\n*\R)}) circle (\R);
\draw[blue](A) -- (\alpha: \Y) circle (\Rpn);
}
\foreach \n in {3,4,...,30}{%% Same as previous loop but without gray stuff
\pgfmathsetmacro{\alpha}{atan(2*\n*\R/(\r+\R))}
\pgfmathsetmacro{\X}{2*\n*\R/sin(\alpha)}
\pgfmathsetmacro{\Rpn}{(CircInv(\X-\R,\r)-CircInv(\X+\R,\r))/2}
\pgfmathsetmacro{\Y}{CircInv(\X+\R,\r)+\Rpn}
\draw[blue](A) (\alpha: \Y) circle (\Rpn);
}
\end{tikzpicture}
答案2
你可以用圆翻转也一样。
我不确定如何使用 TikZ 进行反转,但这里有一个元帖子版本,包含在 中luamplib
。使用 进行编译lualatex
。
\RequirePackage{luatex85}
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
% invert path or pair P in circle C
vardef invert(expr P, C) =
save I, r; pair I; numeric r;
I = center C;
r = abs(point 0 of C shifted -I);
if pair P: if abs(P-I) > 0: unitvector(P-I) scaled (r/abs(P-I)*r) shifted fi I
elseif path P:
save T; numeric T;
T = length P;
for t=0 upto T-1: invert(point t of P, C) .. endfor if cycle P: cycle else: invert(point T of P, C) fi
fi
enddef;
beginfig(1);
pair A,B,C;
numeric r;
A = origin;
C = (10cm,0);
r = 3/4;
B = r[A,C];
path c[];
c1 = fullcircle scaled 2 abs(A-C); % large circle for the inversions
c2 = fullcircle scaled abs(A-C) shifted 1/2[A,C];
c3 = fullcircle scaled abs(A-B) shifted 1/2[A,B];
c4 = fullcircle scaled abs(B-C) shifted 1/2[B,C];
c5 = invert(c4,c1);
numeric d; d = abs(point 0 of c5-point 4 of c5);
for i=1 upto 42:
draw invert(c5 shifted (0,i*d), c1);
endfor
draw subpath(0,4) of c2 withcolor 2/3 blue;
draw subpath(0,4) of c3 withcolor 2/3 blue;
draw subpath(0,4) of c4 withcolor 2/3 blue;
draw A--C;
dotlabel.bot("$A$", A);
dotlabel.bot("$B$", B);
dotlabel.bot("$C$", C);
endfig;
\end{mplibcode}
\end{document}
如果我多画出几个构造部分,这个方法会更容易理解一些:灰色圆圈是c5
我的代码;粉色圆弧是的一部分,它是列中的 s 被反转的c1
圆圈。c5
答案3
这是一个简单的解决方案,使用tkz-euclide v5
最新版本的tkz-euclide: 看第47.25节手册。
\documentclass[tikz,border=3mm]{standalone}
\usepackage[svgnames]{xcolor}
\usepackage{tkz-euclide}% v5
\pgfmathsetmacro{\xB}{6}
\pgfmathsetmacro{\xC}{9}
\pgfmathsetmacro{\xD}{(\xC*\xC)/\xB}
\pgfmathsetmacro{\xJ}{(\xC+\xD)/2}
\pgfmathsetmacro{\r}{\xD-\xJ}
\pgfmathsetmacro{\nc}{16}
\begin{document}
\begin{tikzpicture}
\tkzDefPoints{0/0/A,\xB/0/B,\xC/0/C,\xD/0/D}
\tkzDefCircle[diameter](A,C)\tkzGetPoint{x}
\tkzDrawCircle[fill=teal!30](x,C)
\tkzDefCircle[diameter](A,B)\tkzGetPoint{y}
\tkzDrawCircle[fill=teal!30](y,B)
\foreach \i in {-\nc,...,0,...,\nc}
{\tkzDefPoint(\xJ,2*\r*\i){J}
\tkzDefPoint(\xJ,2*\r*\i-\r){H}
\tkzDefCircleBy[inversion = center A through C](J,H)
\tkzDrawCircle[fill=teal](tkzFirstPointResult,tkzSecondPointResult)}
\end{tikzpicture}
\end{document}