Example: Circles in and around a triangle

Published 2015-09-24 | Author: Stefan Kottwitz

Here we see how easy it is to define circles tangential or by peripheral points.

  • we define objects
  • then we refere to them
  • we chose an order, so later drawn objects overwrite earlier drawn objects

The code is a follow-up to the Releux triangle recipe.

It is explained in the LaTeX Cookbook, Chapter 10, Advanced Mathematics, Drawing geometry pictures.

Download as: [PDF] [TEX]  •  [Open in Overleaf]

Circles in and around a triangle
% Circles in and around a triangle
% Author: Stefan Kottwitz
% https://www.packtpub.com/hardware-and-creative/latex-cookbook
\documentclass[border=10pt]{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
  \tkzDefPoints{0/0/A, 5/0/B, 1/4/C}
  \tkzDefCircle[in](A,B,C)
  \tkzGetPoint{M}
  \tkzGetLength{r}
  \tkzDefCircle[circum](A,B,C)
  \tkzGetPoint{N}
  \tkzGetLength{R}
  \tkzDefPointBy[projection=onto A--B](M)
  \tkzGetPoint{a}
  \tkzDefPointBy[projection=onto B--C](M)
  \tkzGetPoint{b}
  \tkzDefPointBy[projection=onto A--C](M)
  \tkzGetPoint{c}

  \tkzDrawCircle[R](M,\r pt)
  \tkzDrawCircle[R](N,\R pt)
  \tkzDrawPolygon[very thick](A,B,C)
  \tkzDrawLines[dotted](N,A N,B N,C)
  \tkzDrawLines[dashed](M,a M,b M,c)
  \tkzMarkRightAngles(M,a,B M,b,C M,c,C)
  \tkzDrawPoints(A,B,C,M,N,a,b,c)
  \tkzLabelPoints[below left](A,M,a,c)
  \tkzLabelPoints[below right](B)
  \tkzLabelPoints[above](C,b)
  \tkzLabelPoints[below](N)
\end{tikzpicture}
\end{document}

Comments

Adding comments is currently not enabled.

There are currently 0 comments on this entry.

Features
Tags
Scientific and technical areas
LaTeX Cookbook

Cookbook

LaTeX Beginners Guide

Limited discount 50%
coupon code tDRet6Y

Creative Commons License