From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/4477 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: A little Metapost problem. Date: Thu, 29 Mar 2001 09:22:01 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20010329092201.01b4e180@server-1> 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" X-Trace: main.gmane.org 1035395142 26096 80.91.224.250 (23 Oct 2002 17:45:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:45:42 +0000 (UTC) Cc: darnold@northcoast.com (David Arnold), ntg-context@ntg.nl Original-To: "Denis B. Roegel" In-Reply-To: <200103282038.WAA03549@bar.loria.fr> Xref: main.gmane.org gmane.comp.tex.context:4477 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:4477 That's a nice one. How about documenting is [i.e. adding a bit of explanation]. We can then collect them and make a nice example document. At 10:38 PM 3/28/01 +0200, Denis B. Roegel wrote: >`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 > > ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------