ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* A little Metapost problem.
@ 2001-03-28 16:51 David Arnold
  2001-03-28 17:03 ` Marc van Dongen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: David Arnold @ 2001-03-28 16:51 UTC (permalink / raw)
  Cc: ntg-context

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A little Metapost problem.
  2001-03-28 16:51 A little Metapost problem 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
  2 siblings, 0 replies; 5+ messages in thread
From: Marc van Dongen @ 2001-03-28 17:03 UTC (permalink / raw)
  Cc: pragma, ntg-context

David Arnold (darnold@northcoast.com) wrote:

: Attached is a little doc. At the bottom of the page, I've attempted to draw

I can't see it.

Regards,

Marc


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A little Metapost problem.
  2001-03-28 16:51 A little Metapost problem 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
  2 siblings, 0 replies; 5+ messages in thread
From: Johannes Huesing @ 2001-03-28 18:19 UTC (permalink / raw)


On Wed, Mar 28, 2001 at 08:51:10AM -0800, David Arnold wrote:
> Hans, et al,
> 
> Attached is a little doc. 

Nope, as Marc already observed.

> 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. 

There is a small drawing of an audio tape I did which might be related.
You can get it at http://www.ruhrau.de/hannes/tex/metapost/band.mp 
(comments in German, sorry).

Groet

Johannes

-- 
Domain: Adresse im Internet. Besteht aus einem technischen Teil 
(http://www.), einem Namen (erwin_meier) und einer Endung 
(zum Beispiel .de fuer Deutschland ...)
                                       Joerg Albrecht, "Die Zeit" 12/2001


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A little Metapost problem.
  2001-03-28 16:51 A little Metapost problem 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
  2001-03-29  7:22   ` Hans Hagen
  2 siblings, 1 reply; 5+ messages in thread
From: Denis B. Roegel @ 2001-03-28 20:38 UTC (permalink / raw)
  Cc: pragma, ntg-context

`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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A little Metapost problem.
  2001-03-28 20:38 ` Denis B. Roegel
@ 2001-03-29  7:22   ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2001-03-29  7:22 UTC (permalink / raw)
  Cc: David Arnold, ntg-context

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
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-03-29  7:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-28 16:51 A little Metapost problem 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
2001-03-29  7:22   ` Hans Hagen

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).