如何构造与三个给定半圆相切的圆?

如何构造与三个给定半圆相切的圆?
\documentclass[border=15pt,pstricks,12pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}[showgrid](-5,-5)(10,10)
\psset{unit=2cm,PointSymbol=none,PointName=none}
\pstTriangle(0,4){C}(0,0){A}(3,0){B} 
\pstMiddleAB{A}{B}{I1} \pstArcOAB{I1}{A}{B}
\pstMiddleAB{B}{C}{I2} \pstArcOAB{I2}{B}{C}
\pstMiddleAB{C}{A}{I3} \pstArcOAB{I3}{C}{A}

\end{pspicture}
\end{document}

在此处输入图片描述

查看 Asymptote 的结果(TranLeNam 的代码)

\documentclass[border=5pt,varwidth]{standalone}
\usepackage{asymptote}
\begin{document}
\begin{asy}
settings.outformat="pdf"; 
settings.prc=false;
settings.render=20;

unitsize(0.5cm);
import geometry;
defaultpen(fontsize(12pt));
pair A=(0,0), B=(8,0), C=(0,6);
draw(triangle(A,B,C));
pair CP=midpoint(A--B), BP=midpoint(A--C), AP=midpoint(C--B);
draw(arc(CP,A,B)^^arc(BP,C,A)^^arc(AP,B,C)) ;
inversion inv=inversion(20,A);
point AB=inv*B; 
point AC=inv*C; 
point AA=AB+AC; 
circle cABC=excircle(AB,AC,AA);
draw(inv*cABC,red);
shipout(bbox(1mm,1mm+white));
\end{asy}
\end{document}

在此处输入图片描述

当然它没有中心和半径!它使用倒置PSTricks 没有这个功能!?

我确实不知道如何为 PSTricks 绘制它。

更多详细信息,请参阅http://mathworld.wolfram.com/Inversion.htmlhttp://www.piprime.fr/files/asymptote/geometry/modules/geometry.asy.html#struct%20inversion

答案1

假设:A(0,0),B(b,0),C(0,c)

所以 AB 是水平的,AC 是垂直的,我们可以计算出来。@jfbu 做了这些计算,我只是将它们实现到 PSTricks 图片中。

\documentclass[pstricks,dvipsnames]{standalone}
\usepackage{pst-eucl}

\pagestyle{empty}

\begin{document}

\begin{pspicture}(-3,-3.5)(4.5,5.5)
\pstVerb{%
%% Enter the coordinates of the points of the rectangled triangle
%% A(0,0), B(3,0), C(0,4) 
%% So AB is horizontal
%% AC is vertical
/xA 0 def
/yA 0 def
/xB 3 def
/yB 0 def
/xC 0 def
/yC 4 def
%% Midpoints of the sides
/mAx xB xC add 2 div def
/mAy yB yC add 2 div def
/mBx xA xC add 2 div def
/mBy yA yC add 2 div def
/mCx xA xB add 2 div def
/mCy yA yB add 2 div def
%% Calculating the radius of the half circles along the sides of the
%% rectangled triangle
/rAB xA xB sub 2 exp yA yB sub 2 exp add sqrt 2 div def
/AB rAB 2 mul def
/rAC xA xC sub 2 exp yA yC sub 2 exp add sqrt 2 div def
/AC rAC 2 mul def
/rBC xB xC sub 2 exp yB yC sub 2 exp add sqrt 2 div def
/BC rBC 2 mul def
/DENOM BC 5 mul AB 3 mul add AC 3 mul add def
%% @JFBU formula
%% X = 2 AB (AB + BC) / (5 BC + 3 AB + 3 AC)
%% Y = 2 AC (AC + BC) / (5 BC + 3 AB + 3 AC)
%% R = 2 (BC + AB) (BC + AC) /  (5 BC + 3 AB + 3 AC)
/x0 AB BC add AB mul 2 mul DENOM div def
/y0 AC BC add AC mul 2 mul DENOM div def
/r0 BC AB add BC AC add mul 2 mul DENOM div def
%% @JFBU formula for the tangent points
%% P1 = (2(a+c)c, -(a+b+c)c) / (3a + b + 2c)
%% P2 = (-(a+b+c)b, 2(a+b)b) / (3a + 2b + c)
%% P3 = ((a+b+c)(a+c), (a+b+c)(a+b))/ (3a + 2b + 2c)
/p1x BC AB add AB mul 2 mul BC 3 mul AC add AB 2 mul add div def
/p1y BC AC add AB add AB mul BC 3 mul AC add AB 2 mul add div neg def
/p2x BC AC add AB add AC mul BC 3 mul AC 2 mul add AB add div neg def
/p2y BC AC add AC mul 2 mul BC 3 mul AC 2 mul add AB add div def
/p3x BC AC add AB add BC AB add mul BC 3 mul AC 2 mul add AB 2 mul add div def
/p3y BC AC add AB add BC AC add mul BC 3 mul AC 2 mul add AB 2 mul add div def
}
%% Setting the nodes of the points of the triangle
\pstGeonode[PointSymbol=none,PosAngle={225,-45,90}](!xA yA){A}(!xB yB){B}(!xC yC){C}
\pspolygon[linecolor=blue,linejoin=1](A)(B)(C)
%% Setting the nodes of the midpoints of the triangle sides
\pstMiddleAB[PointSymbol=none,PointName=none]{A}{B}{MAB}
\pstMiddleAB[PointSymbol=none,PointName=none]{A}{C}{MAC}
\pstMiddleAB[PointSymbol=none,PointName=none]{B}{C}{MBC}
%% Full circles along the sides of the triangle (not needed!)
%\pscircle(MAB){!rAB}
%\pscircle(MAC){!rAC}
%\pscircle(MBC){!rBC}
%% Drawing the half circles along the sides of the triangle
\pstArcOAB[linecolor=lightgray]{MAB}{A}{B}
\pstArcOAB[linecolor=lightgray]{MAC}{C}{A}
\pstArcOAB[linecolor=lightgray]{MBC}{B}{C}
%% circle and tangent points
\pnode(!x0 y0){O}
\pnode(!p1x p1y){P1}
\pnode(!p2x p2y){P2}
\pnode(!p3x p3y){P3}
\pscircle[linecolor=Green](O){!r0}
\psdot[linecolor=red](P1)\uput[-90](P1){$P_1$}
\psdot[linecolor=red](P2)\uput[180](P2){$P_2$}
\psdot[linecolor=red](P3)\uput[90](P3){$P_3$}
\pspolygon[linejoin=1,linecolor=red,linewidth=0.5pt](P1)(P2)(P3)
\end{pspicture}
\end{document}

在此处输入图片描述

希望这能回答这个问题。

作为动态 gif:

在此处输入图片描述

答案2

对于直角三角形:

\documentclass[border=15pt,pstricks,12pt]{standalone}
\usepackage{pst-eucl}
\def\pstInvCircle#1#2#3#4{%
  \pnode(!
    \psGetNodeCenter{#1}
    \psGetNodeCenter{#2}\psGetNodeCenter{#3} 
    #2.x #1.x sub #2.y #1.y sub Pyth /l12 ED
    #2.x #1.x sub #2.y #1.y sub #3.x #1.x sub #3.y #1.y sub Pyth2 /l23 ED
    #3.x #1.x sub #3.y #1.y sub Pyth /l31 ED 
    l23 5 mul l12 3 mul add l31 3 mul add /Denom ED
    l12 l23 add l12 mul 2 mul Denom div /xM ED
    l31 l23 add l31 mul 2 mul Denom div /yM ED
    l23 l12 add l23 l31 add mul 2 mul Denom div /rM ED
    xM yM ){#4}%
  \pscircle[linecolor=red,linewidth=2pt,dimen=inner](#4){! rM }%
}
\begin{document}
\psset{unit=2}
\begin{pspicture}[showgrid](-2,-2)(4,5)
\psset{PointSymbol=none,PointName=none,dimen=inner,opacity=0.5}
\pstTriangle[linecolor=blue,linewidth=2pt,linejoin=2](0,0){A}(3,0){B}(0,4){C} 
\pstMiddleAB{A}{B}{I1} \pstArcOAB[fillstyle=solid,fillcolor=red!40]{I1}{A}{B}
\pstMiddleAB{B}{C}{I2} \pstArcOAB[fillstyle=solid,fillcolor=blue!40]{I2}{B}{C}
\pstMiddleAB{C}{A}{I3} \pstArcOAB[fillstyle=solid,fillcolor=green!40]{I3}{C}{A}
\psset{linecolor=red,linewidth=2pt,dimen=inner}
\pstInvCircle{A}{B}{C}{O}
\psdot(O)
\end{pspicture}
\end{document}

在此处输入图片描述

答案3

一种可能的方法/起点(但这里不准确)是使用如下方法:

%&pdflatex
% !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape]
\documentclass[a4paper, pdf, x11names]{standalone}
\usepackage{pstricks}
\usepackage{pstricks-add, auto-pst-pdf}

\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}(-5,-5)(5,5)
\pstTriangle[PointSymbol=none, PointName={A,B,A}](4,1){A}(1,3){B}(5,5){C}
\pstCircleABC[CodeFig=true, CodeFigColor=white,linecolor=red, PointSymbol=none, PointName={}]{A}{B}{C}{O}
\end{pspicture}
\end{document}

要得到:

在此处输入图片描述

这里你基本上定义(至少)空间中的三个点并让圆穿过它们。

更新 1:

为了得到期望的结果,定义一些伪点(如所谓的Bezier's trick和圆上的 3 个切点,如

%&pdflatex
% !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape]
\documentclass[a4paper, pdf, x11names]{standalone}
\usepackage{pstricks}
\usepackage{pstricks-add, auto-pst-pdf}
%\usepackage{pst-solides3d}
% https://tex.stackexchange.com/questions/7199/can-pstricks-or-others-draw-the-4-common-tangent-lines-of-2-disjoint-circles-w --> some help from Herbert's solution!
\usepackage{pst-eucl}
\begin{document}
    \begin{pspicture}
        %set a few nodes at desired locations and employ the Bezier trick
    \pnodes(-1.8,2){M1}(3,4.2){M2}(2,-1.5){M3}(-1.7, 3){M4}
    \psdots(M1)(M2)(M3)
    \pstCircleABC[CodeFig=true, CodeFigColor=white,linecolor=red, PointSymbol=none, PointName={}]{M1}{M2}{M3}{M4}{O}
    \pstTriangle(0,4){C}(0,0){A}(3,0){B} 
    \pstMiddleAB{A}{B}{I1} \pstArcOAB{I1}{A}{B}
    \pstMiddleAB{B}{C}{I2} \pstArcOAB{I2}{B}{C}
    \pstMiddleAB{C}{A}{I3} \pstArcOAB{I3}{C}{A}
    \end{pspicture}
    
\end{document}

要得到:

在此处输入图片描述

PS:当然这个解决方案并不复杂,但不需要太多计算就可以实现。只需要反复试验来放置点。

相关内容