There are multiple ways to define and draw a circle. The macros to define a circle are of the analagous to the the macros to draw the circle except they have the form \tkDefCircle. Here are the macros to draw a circle.

**\tkzDrawCircle[<options>](C, A)** defines a circle by the center, C, and one point on the circle, A.

**\tkzDrawCircle[diameter,<options>](A,B)** creates a circle where the points A and B are the endpoints of a diameter of the circle.

**\tkzDrawCircle[R, <options>](C,<radius length>)** creates a circle with center C and the radius specified in <radius length> position

**\tkzDrawCircle[circum, <options>](D,E,F)** creates a circle with through 3 noncollinear points D, E, and F. This circle circumscribes the triangle with vertices D, E, and F.

Here's a tex file illustrating these macros Circle1 and a screenshot of the output is below

There are also macros to create different types of circles.

**\tkzDrawCircle[euler,<options>](G,H,I)** creates Euler's 9 point circle for the triangle with vertices G, H, and I.

**\tkzDrawCircle[apollonius,K=2](C,D)** creates a circle of Apollonious which consists of the set of points whose distance from the two points C and D is a fixed ratio K.

Two intersecting circles are orthogonal when the line segment from the center of one circle is tangent to a point of intersection. The tkz-Euclide package gives you a macro to create orthogonal circles and as well as a macro that gives you access to the intersection points of two circles.

**tkzFirstPointResult** and **tkzSecondPointResult** gives you the points of intersection for 2 intersecting circles.

**\tkzDefCircle[orthogonal from=B](O,A)** given a previously defined circle with center O going through point A together with a point B this macro will find the point on the circle that B is tangent to and define the circle with center B containing that point. To draw the circle I need the center, B, and an intersection point. You can access it through tkzFirstPointResult and tkzSecondPointResult.

**\tkzDefCircle[orthogonal through=z1 and z2](O,A)** start with a previously defined circle having center O and containing point A. Now create 2 points, z1 and z2. There is a tangent line from z1 to the circle and a tangent line from z2 to the circle. The circle, C, created by this macro will have the property that the two tangent lines are tangent to it and the other circle. The center of C can be obtained by either **\tkzGetPoint{c}** or **tkzPointResult** and used to draw the circle. Since tkzPointResult is used by other macros, \tkzGetPoint{c} is better.

Here's the code: Circle2 (.txt)

**Tangents to Circles**

There are two main cases:

- Given a point on the circumference of the circle, draw the tangent line through that point.
- Given a point outside the circle, draw one or both of the tangents from that point to the circle.

A tangent from a point on the circle

For the first case, the tkz-euclide package lets us pick the specific point or choose a point at random on from the geometric object, which in this case is a circle. If you want a random point on a circle use the following command:

**\tkzGetRandPointOn[circle=center -- radius --cm]{--}**

The center of the circle and its radius must be specified. The final argument is to give a name for that random point. So, for example, \tkzGetRandPointOn[circle=center A radius 4cm]{B} says to "get a random point on the circle centered at point A with radius 4cm and name that point B". The next essential part of the process is to get the tangent line at the point. The syntax is:

**\tkzTangent[at=--](--)**

where the first blank is the specific point on the circle the tangent is going through and the second blank is the center of the circle in question. (Multiple circles could contain the specific point but there is only one circle with a specific center that does). In our case \tkzTangent[at=B](A) would be "get the tangent at point B on the circle with center A". This command doesn't draw the tangent line--that's done using the line and line segment commands covered earlier. In order to draw the line or line segment we need another point on the tangent line:

**\tkzGetPoint{--} **

The blank is filled in with the name of the point. So when the 2 commands are consecutive:

\tkzTangent[at=B](A) \tkzGetPoint{h}

you can read it as "on tangent at B for circle centered at A get a point h". With two points on the tangent line the line can be drawn as discussed in detail here. Here is a template with commentary and the screenshot:

Download the file: AlterCL1 (.tex)

Note that your picture will look differently since one tangent of the circle is determined at random.

One or two tangent lines from a point outside the circumference

In this case we need the circle defined by a center, call it A, and a point on the circumference, call it B, and the circle created by \tkzDrawCircle(A,B) which is just "The circle centered at A which contains B on the circumference". Then you need a point outside the circle, call it C. There are two possible tangent lines from C to the circle. In order to construct them we use one command:

**\tkzTangent[from=--](--,--)**

where the first argument is the point outside the circle, the second argument is the center of the circle and the third argument is the point on the circumference. In this case \tkzTangent[from=C](A,B) would be interpreted as "the tangent from point C to the circle centered at A with B on the circumference. Since there are 2 possible points, we get them using the command:

**\tkzGetPoints{--}{--}**

where the two arguments are what you want to call the points of tangency. So \tkzGetPoints{e}{f} would define one point of tangency as point e and the other as point f. With the points making up the line known, the tangent lines can be drawn according to your specifications.

Download the file: AlterCL3 (.tex)

**Line Circle Intersections**

The tkz-euclide package has a powerful macro for getting the intersection points of a line (L) and a circle (C) : **\tkzInterLC**(A,B)(C,D) where (A,B) are points on the line and (C,D) is the center of a circle and a point on the circle. There are two points of intersection and they can be stored into points using \tkzGetPoints. For example:

\tkzInterLC(A,B)(C,D) \tkzGetPoints{E}{F}

will find the intersection of a line and circle and the intersection points will be called E and F. The tkz-euclide package contains enough powerful macros that you'll find there are several ways to approach drawing a problem. Here is some code to create a circle with two perpendicular diameters.

\tkzDefPoint(0,0){A} %Define first point but don't draw it

\tkzDefPoint(3,3){B} % Define the second point but don't draw it

\tkzDrawCircle[diameter](A,B) %Draw the circle that has diameter from A to B

A circle has been drawn which contains points A and B on a diameter.

\tkzDrawSegment[color=red](A,B) %Draw the diameter in red

\tkzDefMidPoint(A,B) \tkzGetPoint{C} %Find the midpoint [center], call it C

The diameter from A to B has been drawn and the center of the circle has been calculated. It is can be referenced as point C. Note the macro \tkzDefMidPoint(A,B) does what you think: determines the midpoint of segment (A,B).

\tkzDefLine[orthogonal=through C](B,A) \tkzGetPoint{D} %Construct a line

%through center C which is perpendicular to diameter AB. Get point D from line

\tkzInterLC(C,D)(C,B) \tkzGetPoints{E}{F}%Find the intersection of the line

%through C and D with the circle having center C and containing point B

This is where the magic happens. Whereas constructing the circle based off of a diameter made one diameter easy to draw, the second diameter takes some work. The center was used as one point on the 2nd line and the second point was calculated to determine a line which was perpendicular to (A,B). The only problem is we need the intersection points with the circle to create the diameter. The line \tkzInterLC(C,D)(C,B) \tkzGetPoints{E}{F} performs the calculation and stores the points as E and F. It's easy to finish the problem off.

\tkzDrawPoint[color=red, fill=red](E) %Draw red point E

\tkzLabelPoint[above left,red](E){$E$} %Label point E as E

\tkzDrawPoint[color=red, fill=red](F) %Draw red point F

\tkzLabelPoint[below right,red](F){$F$} %Label point F as F

\tkzDrawSegment[color=red](E,F) %Draw the line segment from E to F

\tkzDrawPoint[color=black, fill=black](C) %Draw black point on center

Download the file: AlterLC1 (.tex)

Here's a second example. In this case I wanted to illustrate that the intersection points of the line and circle are calculated even though the line segment only has one intersection with the circle.

The code has been commented. You can experiment with it on your own.

Download the file: AlterLC2 (.tex)

**Circle-Circle Intersections**

tkz-euclide has a macro for finding the intersection point of 2 circles, \tkzInterCC, where CC tells you "circle-circle" (as opposed to LC, for "line-circle" above"). The macro can be used in different ways depending on how the circle is defined. The first example is when the circles are defined using the center point a point on the circle. For example:

**\tkzInterCC(D,B)(A,C)**

Here is code plus comments for a complete example:

\tkzDefPoint(0,0){A} %center of circle 1

\tkzDefPoint(1,0){B} %point on circle 1

\tkzDefPoint(2,0){C} %point on circle 2

\tkzDefPoint(4,0){D} %center of circle 2

\tkzDrawCircle(A,C) % draw the circle centered at A containing point C

\tkzDrawCircle[color=blue](D,B) % draw the circle centered at D containing point B

\tkzInterCC(D,B)(A,C) \tkzGetPoints{M}{N} %Find the points of intersection

% of circle centered at D containing point C with the circle centered at A

% containing point C

\tkzDrawPolygon[color=brown, ultra thick](D,M,N) %a thick brown triangle

\tkzLabelPoint[below=5pt](M){$M$} %label the points

\tkzLabelPoint[above=5pt](N){$N$}

\tkzDrawSegment[color=red](M,A) %the segment from center of circle to M

\tkzDrawSegment[color=red](N,A) %the segment from center of circle to N

\tkzDrawPoints[color=orange,fill=orange,size=20pt](M,N)%Draw points M, N

Download the code: AlterCC1 (.tex)

A second way to use the macro is to give it the point which is the center of the circle and the radius. You also need to choose R as an option. For example:

**\tkzInterCC[R](A,1 cm)(B,1 cm). **

In this second example, there are many intersection points**. I've added code to display the points while the diagram is being created and when the diagram is complete, I comment out the code**.

\tkzDefPoint(0,0){A} %center of circle 1

\tkzDrawCircle[R](A,1cm) %draw circle 1 centered at A with radius 1

\tkzDefPoint(1.5,0){B} %center of circle 2

\tkzDrawCircle[R](B,1cm) %draw circle 2 centered at B with radius 1

\tkzDefPoint(.75,-1){C} %center of circle 3

\tkzDrawCircle[R](C,1cm) %draw circle 3 centered at C with radius 1

\tkzInterCC[R](A,1 cm)(B,1 cm) \tkzGetPoints{M1}{N1} %get the intersection

% of circles centered at A with radius 1 and B with radius 1. Store as M1, N1

%\tkzDrawPoint(M1) \tkzDrawPoint[color=red, fill=red](N1)%Helps

%to figure where the points are...then comment out

\tkzInterCC[R](A,1 cm)(C,1 cm) \tkzGetPoints{M2}{N2}

%\tkzDrawPoint(M2) \tkzDrawPoint[color=red, fill=red](N2)%Helps

%to figure where the points are...then comment out

\tkzInterCC[R](B,1 cm)(C,1 cm) \tkzGetPoints{M3}{N3}

%\tkzDrawPoint(M3) \tkzDrawPoint[color=red, fill=red](N3)%Helps

%to figure where the points are...then comment out

\tkzDrawPolygon[color=blue, dashed](M1,N2,M3) %Draw Triangle through the points

\tkzDrawPolygon[color=red](N1,M2,N3) %Draw Triangle through the points

Download the code: AlterCC2 (.tex)