From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/4473 Path: main.gmane.org!not-for-mail From: "Denis B. Roegel" Newsgroups: gmane.comp.tex.context Subject: Re: A little Metapost problem. Date: Wed, 28 Mar 2001 22:38:18 +0200 (MET DST) Sender: owner-ntg-context@let.uu.nl Message-ID: <200103282038.WAA03549@bar.loria.fr> References: <3.0.5.32.20010328085110.011cd810@mail.northcoast.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035395138 26055 80.91.224.250 (23 Oct 2002 17:45:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:45:38 +0000 (UTC) Cc: pragma@wxs.nl, ntg-context@ntg.nl Original-To: darnold@northcoast.com (David Arnold) In-Reply-To: <3.0.5.32.20010328085110.011cd810@mail.northcoast.com> from "David Arnold" at Mar 28, 2001 08:51:10 AM Xref: main.gmane.org gmane.comp.tex.context:4473 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:4473 `David Arnold' wrote > > Hans, et al, > > Attached is a little doc. At the bottom of the page, I've attempted to draw > to circles tangent to one another. The line PQ is supposed to be a common > tangent line, that is, it is supposed to be tangent to both circles. > > I used the formula to compute theta, but the asin routine in Metapost is > not that accurate and the line dips a little too low on the first circle, > and a little high on the second circle. > > I'd love to see some Metapost experts demo some cute ways of calculating > the common tangent PQ. Eventually, when I provide answers for my students, > I will need to know that points A and B where the common tangent touches > the two circles, as I will need to draw in radii of the circles > perpendicular to the common tangent to explain how to do the problem. Maybe the following is useful? Denis beginfig(1); pair A,B,O,P,Q; numeric u,r,R; R=2cm; r=1cm; A=origin; B-A=(5cm,0); draw fullcircle scaled 2R shifted A; draw fullcircle scaled 2r shifted B; O=(1+r/(R-r))[A,B]; P-A=R*(R/arclength(A--O),sqrt(1-(R/arclength(A--O))**2)); Q=(arclength(O--B)/arclength(O--A))[O,P]; draw Q--P--A--B--Q--O--B; label.rt(btex $O$ etex,O); label.bot(btex $A$ etex,A); label.bot(btex $B$ etex,B); label.top(btex $P$ etex,P); label.top(btex $Q$ etex,Q); endfig; end