need some explanation drawing circles via tan,tan,tan
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
- Newbie Member
- Posts: 7
- Joined: Wed Feb 12, 2025 4:24 am
need some explanation drawing circles via tan,tan,tan
hello
in autocad, there are 6 modes to draw circles (see attachment, pls).
i am trying to understand the underlying geometrical logic and math calculating etc..
i challenged the topic but expcept last one.
i searched on internet, i found some information but i couldnt understand, ie, i couldnt find enough explanation.
there, it was apollonian, inversive geometry, etc..
so, then, i decided to read open source codes and, at the end, i am here..
could someone explain drawing circle with (tan,tan,tan) mode..? how catch and calc tangent points and radius..
thank you.
in autocad, there are 6 modes to draw circles (see attachment, pls).
i am trying to understand the underlying geometrical logic and math calculating etc..
i challenged the topic but expcept last one.
i searched on internet, i found some information but i couldnt understand, ie, i couldnt find enough explanation.
there, it was apollonian, inversive geometry, etc..
so, then, i decided to read open source codes and, at the end, i am here..
could someone explain drawing circle with (tan,tan,tan) mode..? how catch and calc tangent points and radius..
thank you.
- Attachments
-
- Capture.PNG (62.11 KiB) Viewed 57828 times
-
- Premier Member
- Posts: 4872
- Joined: Wed Sep 27, 2017 4:17 pm
Re: need some explanation drawing circles via tan,tan,tan
Hi,
Also known as the Apollonius's problem.
Divided into 1+9 distinct cases.
It is in fact a single problem when a point is considered as an infinite small circle and a straight line is seen as an infinite large circle.
Only, calculations with zero and/or an infinite value are problematic at best.
Each of the 9 cases has its own method for solving the problem efficiently.
In the main article there is an historical overview of very different attempts, all valid, not all worked out in detail.
Not every approach will lead to all or just all possible solutions, additionally steps can be required.
In the other article each case is explained in detail.
For the given example, denoted LLL, there are typically 4 solutions:
- Each center will be located at the intersection of the bisecting lines of the three given lines.
- Expect a second smaller solution tangent to and at the right of the red circle.
- Because the 2 quasi horizontal lines are not parallel, expect 2 very large solutions at the right.
- Each radius is then the 'shortest distance' to any of the 3 lines regarded as endless.
The 3-point case (PPP) is the simplest one, resulting in a straight line when co-linear or a 3-point-circle when not.
Some to many solutions are based on inversions in regards with a circle of inversion.
Reducing the problem to a more easy to solve case, the solutions of the original problem are the inversions of the intermediate solutions.
But inversions don't solve everything and there is a draw-back for calculations using the floating-point system.
Then 0.1 + 0.1 + 0.1 is not exactly equal to 0.3!
Every value has some limited accuracy and any kind of calculation has some degree of uncertainty.
Inversions also tend to make minute things huge and larger things very small.
Again an issue using the floating-point system.
At best you could attach a drawing with your problem case.
I am in the process of enhancing QCAD capabilities, fixing exceptions and increasing the accuracy for the Apollonius resource.
Because of my insights I can perfectly answer the question 'HowTo' for a specific case.
Regards,
CVH
Also known as the Apollonius's problem.
Divided into 1+9 distinct cases.
It is in fact a single problem when a point is considered as an infinite small circle and a straight line is seen as an infinite large circle.
Only, calculations with zero and/or an infinite value are problematic at best.

Each of the 9 cases has its own method for solving the problem efficiently.
In the main article there is an historical overview of very different attempts, all valid, not all worked out in detail.
Not every approach will lead to all or just all possible solutions, additionally steps can be required.
In the other article each case is explained in detail.
For the given example, denoted LLL, there are typically 4 solutions:
- Each center will be located at the intersection of the bisecting lines of the three given lines.
- Expect a second smaller solution tangent to and at the right of the red circle.
- Because the 2 quasi horizontal lines are not parallel, expect 2 very large solutions at the right.
- Each radius is then the 'shortest distance' to any of the 3 lines regarded as endless.
The 3-point case (PPP) is the simplest one, resulting in a straight line when co-linear or a 3-point-circle when not.
Some to many solutions are based on inversions in regards with a circle of inversion.
Reducing the problem to a more easy to solve case, the solutions of the original problem are the inversions of the intermediate solutions.
But inversions don't solve everything and there is a draw-back for calculations using the floating-point system.
Then 0.1 + 0.1 + 0.1 is not exactly equal to 0.3!
Every value has some limited accuracy and any kind of calculation has some degree of uncertainty.
Inversions also tend to make minute things huge and larger things very small.
Again an issue using the floating-point system.
At best you could attach a drawing with your problem case.
I am in the process of enhancing QCAD capabilities, fixing exceptions and increasing the accuracy for the Apollonius resource.
Because of my insights I can perfectly answer the question 'HowTo' for a specific case.
Regards,
CVH
Last edited by CVH on Thu Feb 13, 2025 7:56 am, edited 1 time in total.
-
- Newbie Member
- Posts: 7
- Joined: Wed Feb 12, 2025 4:24 am
Re: need some explanation drawing circles via tan,tan,tan
thank you CVH for your informative reply.
i remember that i walked on these wikipedia pages. actually i am looking for a step-by-step tutorial.
as a introductory case, it is the famous kissing 4 circles problem (CCC form). using decartes formula, we can calc the two radiis,
but how can we find the tangent points? i tried to get them by iteration, it is (not) ok but it is trival.
for me, the origines of my problem are
1) filling space with randomize?? and non-intersection circles that maximized occupation and minimized gaps.
2) trisection method for placing base stations to get optimal location
thank you.
i remember that i walked on these wikipedia pages. actually i am looking for a step-by-step tutorial.
as a introductory case, it is the famous kissing 4 circles problem (CCC form). using decartes formula, we can calc the two radiis,
but how can we find the tangent points? i tried to get them by iteration, it is (not) ok but it is trival.
for me, the origines of my problem are
1) filling space with randomize?? and non-intersection circles that maximized occupation and minimized gaps.
2) trisection method for placing base stations to get optimal location
thank you.
- Attachments
-
- zzzTilingShapes-643114345.bmp (732.47 KiB) Viewed 57730 times
-
- Capture.PNG (30.7 KiB) Viewed 57730 times
-
- Premier Member
- Posts: 4872
- Joined: Wed Sep 27, 2017 4:17 pm
Re: need some explanation drawing circles via tan,tan,tan
Hi,
Considering that you already know the radii this should not be a problem.
For example for the red circle:
Draw two larger concentric circles around 2 white circles adding Rred to their radius.
These don't intersect or are tangent in a tangent point or intersect twice.
One of the intersections is the center of the red circle.
Something similar for the cyan circle but then with a difference of the radii.
Remind that there are 0-6 or 8 solutions for the CCC case, for these 3 white circles there are 8 solutions.
Any of the three circles can be externally tangent or internally tangent: 2x2x2=8.
Regards,
CVH
Considering that you already know the radii this should not be a problem.
For example for the red circle:
Draw two larger concentric circles around 2 white circles adding Rred to their radius.
These don't intersect or are tangent in a tangent point or intersect twice.
One of the intersections is the center of the red circle.
Something similar for the cyan circle but then with a difference of the radii.
Remind that there are 0-6 or 8 solutions for the CCC case, for these 3 white circles there are 8 solutions.
Any of the three circles can be externally tangent or internally tangent: 2x2x2=8.
Regards,
CVH
-
- Newbie Member
- Posts: 7
- Joined: Wed Feb 12, 2025 4:24 am
Re: need some explanation drawing circles via tan,tan,tan
hello CVH
yes, you are right. i see it myself now, i understand red one.
so, it doesnt need to find the tangent points in this stuation.
but i couldnt cyan one..
many thanks
ps: my head is about just to explode, it is overheated.. :/
yes, you are right. i see it myself now, i understand red one.
so, it doesnt need to find the tangent points in this stuation.
but i couldnt cyan one..

many thanks
ps: my head is about just to explode, it is overheated.. :/
- Attachments
-
- trilateration.gif (1.99 MiB) Viewed 57610 times
-
- Premier Member
- Posts: 4872
- Joined: Wed Sep 27, 2017 4:17 pm
Re: need some explanation drawing circles via tan,tan,tan
Hi,
Your animation only shows that the center of the black solution circle 'Cinner' is on the intersection of:
- Cred-dashed with radius = Rred+Rinner and Cblue-dashed with radius = Rblue+Rinner
OR/AND
- Cred-dashed with radius = Rred+Rinner and Cgreen-dashed with radius = Rgreen+Rinner
OR/AND
- Cblue-dashed with radius = Rblue+Rinner and Cgreen-dashed with radius = Rgreen+Rinner
OR in my words:
On the intersection of two larger concentric circles around any 2 circles adding Rinner to their radius.
As said, by definition, 2 circles can intersect twice, once (are tangent) or not at all.
At the end of the animation the dashed circles all intersect twice with another dashed circle.
The mutual intersection point is the center of Cinner.
All supposing that you already know the radius of Cinner
You mentioned Descartes' theorem
Read it again ... Carefully:
That is not true for any of your examples.
You then need to solve the classical CCC case for 3 not touching and not intersecting circles.
For example by solving three simultaneous quadratic equations
Solving for Cinner the triples of signs is (+, +, +), 1 out 8 solutions for center (x, y) and then 1 root out 2 for the radius.
I further read that you also want to know the points of contact.
2 circles are tangent when the distance between their centers is the sum or the absolute difference of their radii.
Respectively called externally or internally tangent.
For 2 externally tangent circles that is exactly on a line between both centers.
The point of tangency is then the intersection of one of the circles with the line passing through both centers.
Also true for internally tangent by extending the center-center line beyond the larger circle.
Since Apollonius of Perga (c. 262 BC – c. 190 BC)
e.g. Descartes' theorem 1643
e.g. Soddy's circles 1936
e.g. A definitive enumeration, with 33 distinct cases, was published in 1983
e.g. Algebraic approach, Courant and Robbins 1996
Nearly 2 and 1/4 millennia now.
All fine for exact science.
The major hurdle is to implement all this within the limited precision of the floating-point system.
Regards,
CVH
Adding solution radius for red, the difference of the radii for cyan.
Your animation only shows that the center of the black solution circle 'Cinner' is on the intersection of:
- Cred-dashed with radius = Rred+Rinner and Cblue-dashed with radius = Rblue+Rinner
OR/AND
- Cred-dashed with radius = Rred+Rinner and Cgreen-dashed with radius = Rgreen+Rinner
OR/AND
- Cblue-dashed with radius = Rblue+Rinner and Cgreen-dashed with radius = Rgreen+Rinner
OR in my words:
On the intersection of two larger concentric circles around any 2 circles adding Rinner to their radius.
As said, by definition, 2 circles can intersect twice, once (are tangent) or not at all.
At the end of the animation the dashed circles all intersect twice with another dashed circle.
The mutual intersection point is the center of Cinner.


You mentioned Descartes' theorem
Read it again ... Carefully:
- For every four kissing, or mutually tangent circles, the radii of the circles satisfy a certain quadratic equation.
That is not true for any of your examples.
You then need to solve the classical CCC case for 3 not touching and not intersecting circles.
For example by solving three simultaneous quadratic equations
Solving for Cinner the triples of signs is (+, +, +), 1 out 8 solutions for center (x, y) and then 1 root out 2 for the radius.
I further read that you also want to know the points of contact.
2 circles are tangent when the distance between their centers is the sum or the absolute difference of their radii.
Respectively called externally or internally tangent.
For 2 externally tangent circles that is exactly on a line between both centers.
The point of tangency is then the intersection of one of the circles with the line passing through both centers.
Also true for internally tangent by extending the center-center line beyond the larger circle.
Many heads have.

Since Apollonius of Perga (c. 262 BC – c. 190 BC)
e.g. Descartes' theorem 1643
e.g. Soddy's circles 1936
e.g. A definitive enumeration, with 33 distinct cases, was published in 1983
e.g. Algebraic approach, Courant and Robbins 1996
Nearly 2 and 1/4 millennia now.
All fine for exact science.
The major hurdle is to implement all this within the limited precision of the floating-point system.
Regards,
CVH
Last edited by CVH on Thu Feb 13, 2025 10:10 am, edited 1 time in total.
-
- Newbie Member
- Posts: 7
- Joined: Wed Feb 12, 2025 4:24 am
Re: need some explanation drawing circles via tan,tan,tan
hello CVH
many thanks your valuable replies.
i think, i must restart to digging and focus on topic carefully, from scratch..
in the following times, probably, i need to ask about new issues.
regards
many thanks your valuable replies.
i think, i must restart to digging and focus on topic carefully, from scratch..
in the following times, probably, i need to ask about new issues.
regards
-
- Premier Member
- Posts: 4872
- Joined: Wed Sep 27, 2017 4:17 pm
Re: need some explanation drawing circles via tan,tan,tan
Hi,
I indulged myself this conversation because it shows to QCAD users how troublesome it is to solve for solutions of the tangent circles tools.
Something that is taken for granted, expecting nothing but all and only correct answers.
Even knowing that 'utterly correct' is very likely not possible.
In that perspective it wasn't really off-topic.
For additionally support please contact me off-forum by PM (Private Message).
The easiest way is to click on my user name and take it from there.
Regards,
CVH
I indulged myself this conversation because it shows to QCAD users how troublesome it is to solve for solutions of the tangent circles tools.
Something that is taken for granted, expecting nothing but all and only correct answers.
Even knowing that 'utterly correct' is very likely not possible.
In that perspective it wasn't really off-topic.
For additionally support please contact me off-forum by PM (Private Message).
The easiest way is to click on my user name and take it from there.
Regards,
CVH
-
- Newbie Member
- Posts: 7
- Joined: Wed Feb 12, 2025 4:24 am
Re: need some explanation drawing circles via tan,tan,tan
hello
some pages from
a handbook on curves and their properties (1947)
----
https://archive.org/details/handbookonc ... e/mode/2up
regs
some pages from
a handbook on curves and their properties (1947)
----
https://archive.org/details/handbookonc ... e/mode/2up
regs
- Attachments
-
- handbookoncurves0000robe_0035.jpg (112.61 KiB) Viewed 51680 times
-
- handbookoncurves0000robe_0036.jpg (120.04 KiB) Viewed 51680 times
-
- handbookoncurves0000robe_0037.jpg (83.81 KiB) Viewed 51680 times
-
- handbookoncurves0000robe_0038.jpg (127.22 KiB) Viewed 51680 times
-
- handbookoncurves0000robe_0039.jpg (120.21 KiB) Viewed 51680 times
-
- Newbie Member
- Posts: 7
- Joined: Wed Feb 12, 2025 4:24 am
Re: need some explanation drawing circles via tan,tan,tan
and also
CCC: Gergonnes's Solution to Apollonius' Problem
---
https://www.cut-the-knot.org/Curriculum ... onne.shtml
regs
CCC: Gergonnes's Solution to Apollonius' Problem
---
https://www.cut-the-knot.org/Curriculum ... onne.shtml
regs
-
- Premier Member
- Posts: 4872
- Joined: Wed Sep 27, 2017 4:17 pm
Re: need some explanation drawing circles via tan,tan,tan
Hi,
Nothing that I didn't know yet ...
It is clear that problem (c), figure 20, is not worked out.
Simply because there is no closed format to solve for all cases of the Apollonius's problem.
Gergonnes's Solution is only one of them ... I dare you to code that.
There are several 'correct' assumptions to be made.
Read the last line.
Solving three simultaneous quadratic equations is your best option Math based.
QCAD has several build-in geometrically methods to handle Points, Lines and Circles.
It also includes the intersections of most shapes, being tangent, orthogonal and so on.
GeoGebra is also capable of these things.
All this simplifies the geometrical approaches ... To some extent.
Remember that these geometrical methods are typically seen as Straightedge and compass constructions
Regards,
CVH
Nothing that I didn't know yet ...
It is clear that problem (c), figure 20, is not worked out.
Simply because there is no closed format to solve for all cases of the Apollonius's problem.
Gergonnes's Solution is only one of them ... I dare you to code that.
There are several 'correct' assumptions to be made.
Read the last line.
Solving three simultaneous quadratic equations is your best option Math based.
QCAD has several build-in geometrically methods to handle Points, Lines and Circles.
It also includes the intersections of most shapes, being tangent, orthogonal and so on.
GeoGebra is also capable of these things.
All this simplifies the geometrical approaches ... To some extent.
Remember that these geometrical methods are typically seen as Straightedge and compass constructions
Regards,
CVH
-
- Newbie Member
- Posts: 7
- Joined: Wed Feb 12, 2025 4:24 am
Re: need some explanation drawing circles via tan,tan,tan
hello
yes, you are right..
for a same center circle, there are infinite stiuation/solution.. it must be clear under some considerations.
thanks.
yes, you are right..
for a same center circle, there are infinite stiuation/solution.. it must be clear under some considerations.
thanks.
- Attachments
-
- Drawing1.dwg
- (49.78 KiB) Downloaded 457 times
-
- Premier Member
- Posts: 4872
- Joined: Wed Sep 27, 2017 4:17 pm
Re: need some explanation drawing circles via tan,tan,tan
Your issue has nothing to do with QCAD.
At present it is capable of solving for all 8 solutions of the CCC case in most situations.
2 of those solutions will be the 3x internal and the 3x external tangent circle.
I do remember suggesting that we take this conversation off-forum.
Please keep the QCAD forum 'on-topic'.
Expect a Private Message explaining the mathematical approach.
Regards,
CVH
At present it is capable of solving for all 8 solutions of the CCC case in most situations.
2 of those solutions will be the 3x internal and the 3x external tangent circle.
I do remember suggesting that we take this conversation off-forum.

Please keep the QCAD forum 'on-topic'.
Expect a Private Message explaining the mathematical approach.
Regards,
CVH