From: "Denis B. Roegel" <Denis.Roegel@loria.fr>
Cc: pragma@wxs.nl, ntg-context@ntg.nl
Subject: Re: A little Metapost problem.
Date: Wed, 28 Mar 2001 22:38:18 +0200 (MET DST) [thread overview]
Message-ID: <200103282038.WAA03549@bar.loria.fr> (raw)
In-Reply-To: <3.0.5.32.20010328085110.011cd810@mail.northcoast.com> from "David Arnold" at Mar 28, 2001 08:51:10 AM
`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
next prev parent reply other threads:[~2001-03-28 20:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-28 16:51 David Arnold
2001-03-28 17:03 ` Marc van Dongen
2001-03-28 18:19 ` Johannes Huesing
2001-03-28 20:38 ` Denis B. Roegel [this message]
2001-03-29 7:22 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200103282038.WAA03549@bar.loria.fr \
--to=denis.roegel@loria.fr \
--cc=ntg-context@ntg.nl \
--cc=pragma@wxs.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).