5

I'm aware that one can draw an incircle of a triangle in tkz-euclide with:

\tkzDefCircle[in](A,B,C)\tkzGetPoint{I}\tkzGetLength{r}
\tkzDrawCircle[R](I,r pt)

Is there a shortcut for drawing the excircle of a triangle, instead? As a reference, this is the three excircles of a triangle: excircles of a triangle

Thanks!

1
  • Welcome to TeX.SX. Do you try to build something with bisector(out) and projection for example. You can make your own macros. In some days, ex circles will be a part of tkz-euclide but I need to clean some codes and to add a new documentation ( if possible in english ) Mar 20, 2016 at 11:31

2 Answers 2

5

I work actually on a new version of tkz-euclide. Now there are ex circles

% The next version of tkz-euclide arrives with :

% tkzExCenter(A,B,C) defines a point center of the excircle tgt to AB and

% \tkzDefCircle[ex](A,B,C) for excenter circle tgt to AB You an get a point and a radius

% You have also \tkzDrawCircle[ex](A,B,C)

% Example

Actually you can do that

\documentclass{article}
\usepackage{tkz-euclide} % loads  TikZ and tkz-base
\usetkzobj{all}

\makeatletter
%<----------------------------------–>
%                     ExCenter
%<----------------------------------–>
\def\tkzExCenter(#1,#2,#3){%
\begingroup
    \tkzDefBisectorOutLine(#1,#2,#3)\tkzGetPoint{tkz@bex2}
    \tkzDefBisectorOutLine(#2,#1,#3)\tkzGetPoint{tkz@bex1}
    \tkzInterLL(#1,tkz@bex1)(#2,tkz@bex2)
\endgroup
} 

\def\tkzDefExCircle(#1,#2,#3){%
\begingroup
   \tkzExCenter(#1,#2,#3) \tkzGetPoint{tkz@ea}
   \tkzUProjection(#1,#2)(tkz@ea)
   \tkzCalcLength(tkzPointResult,tkz@ea)
   \tkzRenamePoint(tkz@ea){tkzPointResult} 
\endgroup
} 
\makeatother



\begin{document}
    \begin{tikzpicture}[scale=.4]
      \tkzInit[xmin=-10,xmax=10,ymin=-10,ymax=10]
      \tkzClip[space=3]
      \tkzDefPoint(0,0){A}
      \tkzDefPoint(6,1){B}
      \tkzDefPoint(1,4){C}

      \tkzDrawLines[add=1 and 1](A,B A,C B,C)
      \tkzDefExCircle(A,B,C) \tkzGetPoint{I} \tkzGetLength{rI}
      \tkzDefExCircle(C,A,B) \tkzGetPoint{J} \tkzGetLength{rJ}
      \tkzDefExCircle(B,C,A) \tkzGetPoint{K} \tkzGetLength{rK}
      \tkzDrawPoints(I,J,K)
      \tkzLabelPoints(A,B,C,I,J,K)
      \tkzDrawPolygon(A,B,C)
      \tkzDrawPoints(A,B,C)
      \tkzDrawCircle[R](J,\rJ pt)  
      \tkzDrawCircle[R](I,\rI pt)      
      \tkzDrawCircle[R](K,\rK pt)
    \end{tikzpicture}
\end{document}

enter image description here

2
  • 1
    It will be easier with tkz-euclide 2.0 because it will be enough to write \tkzDefCircle [ex] (A,B,C) Mar 20, 2016 at 11:20
  • The \tkzDefBisecterOutLine is new to me... Thanks! My original workaround consists of a homothety of the incenter from one of the points whoops Mar 21, 2016 at 23:57
2

Just for comparison, and possibly the benefit of others reading this question, here is a way to produce excircles (and incircles) in plain Metapost as shown here:

enter image description here

prologues := 3;
outputtemplate := "%j%c.eps";

vardef incircle(expr A,B,C) = 
  save a,b,c,t; pair a,b,c,t;
  a = A + unitvector(C-A)+unitvector(B-A);
  b = B + unitvector(A-B)+unitvector(C-B);
  c = whatever[A,a] = whatever [B,b]; t = whatever[A,B];
  t-c = whatever * (B-A) rotated 90;
  fullcircle scaled 2 abs(c-t) shifted c
enddef;

vardef excircle(expr A,B,C) = 
  save a,b,c,t; pair a,b,c,t;
  a = A + (unitvector(C-A)+unitvector(B-A)) rotated 90;
  b = B + (unitvector(A-B)+unitvector(C-B)) rotated 90;
  c = whatever[A,a] = whatever [B,b]; t = whatever[A,B];
  t-c = whatever * (B-A) rotated 90;
  fullcircle scaled 2 abs(c-t) shifted c
enddef;

beginfig(1);

pair A, B, C;
A = origin;
B = 89 right rotated 10;
C = 55 right rotated 72;

fill A--B--C--cycle withcolor .87[blue,white];
path c[];
c1 = excircle(B,C,A);
c2 = excircle(C,A,B);
c3 = excircle(A,B,C);

draw c1 withcolor .53 red;
draw c2 withcolor .53 green;
draw c3 withcolor .53 blue;

drawoptions(withcolor .6 white);
draw A -- center c1;
draw B -- center c2;
draw C -- center c3;
draw center c1 -- center c2 -- center c3 -- cycle;
draw incircle(A,B,C);

drawoptions();
draw 2[A,B] -- 2[B,A];
draw 2[B,C] -- 2[C,B];
draw 3[C,A] -- 3[A,C];

label(btex $A$ etex, A - (10,10)); drawdot A withpen pencircle scaled dotlabeldiam;
label(btex $B$ etex, B + (18,-2)); drawdot B withpen pencircle scaled dotlabeldiam;
label(btex $C$ etex, C + (-4,10)); drawdot C withpen pencircle scaled dotlabeldiam;

dotlabel.urt (btex $a$ etex, center c1);
dotlabel.ulft(btex $b$ etex, center c2);
dotlabel.bot (btex $c$ etex, center c3);

endfig;
end.

Notes

The incircle routine works by finding the intersection of two adjacent internal angle bisectors (c) and the tangent point (t) on the corresponding side. The excircle routine is identical except that the bisectors are rotated 90° so that we get the external angle bisectors.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .