FWIW, this is just a little example of how I can find tangent circles using circle intersections, even between tangent circles that share a singe point of intersection. Say one has two circles c0 and c1 that are tangent and/or intersect, and plots them in red. Here is some C++ code of mine that does this:
ct_circle c0 = { { .25, 0 }, .5 };
ct_circle c1 = { { -.25, 0 }, .5 };
plot.circle(c0.c, c0.r, CT_CAIRO_RGB(1.0, 0.0, 0.0));
plot.circle(c1.c, c1.r, CT_CAIRO_RGB(1.0, 0.0, 0.0));
Okay, now we want to find two circles i0 and i1 of a given radius radd that are tangent to both c0 and c1. First we define two circles cn0 and cn1 that share the same center points of c0 and c1, but have a radius of c0's radius plus radd, and c1's radius plus radd respectively:
double radd = .25;
ct_circle cn0 = { c0.c, c0.r + radd };
ct_circle cn1 = { c1.c, c1.r + radd };
Lets plot those in yellow:
plot.circle(cn0.c, cn0.r, CT_CAIRO_RGB(1.0, 1.0, 0.0));
plot.circle(cn1.c, cn1.r, CT_CAIRO_RGB(1.0, 1.0, 0.0));
Finally, we want to find the intersection points i0 and i1 of circles cn0 and cn1:
ct_circle i0 = { { 0, 0 }, 0 };
ct_circle i1 = { { 0, 0 }, 0 };
ct_circle_intersect(cn0, cn1, i0, i1);
The circle intersection algorithm is well known. Just in case you want to see it take a look at the following JavaScript code for my webpage here:
http://webpages.charter.net/appcore/fractal/ttr
Now, i0 and i1 have their proper centers wrt radd radius. Lets go ahead and plot them in purple using a radius of radd:
plot.circle(i0.c, radd, CT_CAIRO_RGB(1.0, 0.0, 1.0));
plot.circle(i1.c, radd, CT_CAIRO_RGB(1.0, 0.0, 1.0));
BAM! They are tangent to the circles in red!
;^D
Also, this works for circles of different sizes and different values of radd. The attached renderings will show some of this.
This is a perfect medium to build a tangent circle fractal.
Any thoughts?
___
#Fractal #Circle #Intersection
ct_circle c0 = { { .25, 0 }, .5 };
ct_circle c1 = { { -.25, 0 }, .5 };
plot.circle(c0.c, c0.r, CT_CAIRO_RGB(1.0, 0.0, 0.0));
plot.circle(c1.c, c1.r, CT_CAIRO_RGB(1.0, 0.0, 0.0));
Okay, now we want to find two circles i0 and i1 of a given radius radd that are tangent to both c0 and c1. First we define two circles cn0 and cn1 that share the same center points of c0 and c1, but have a radius of c0's radius plus radd, and c1's radius plus radd respectively:
double radd = .25;
ct_circle cn0 = { c0.c, c0.r + radd };
ct_circle cn1 = { c1.c, c1.r + radd };
Lets plot those in yellow:
plot.circle(cn0.c, cn0.r, CT_CAIRO_RGB(1.0, 1.0, 0.0));
plot.circle(cn1.c, cn1.r, CT_CAIRO_RGB(1.0, 1.0, 0.0));
Finally, we want to find the intersection points i0 and i1 of circles cn0 and cn1:
ct_circle i0 = { { 0, 0 }, 0 };
ct_circle i1 = { { 0, 0 }, 0 };
ct_circle_intersect(cn0, cn1, i0, i1);
The circle intersection algorithm is well known. Just in case you want to see it take a look at the following JavaScript code for my webpage here:
http://webpages.charter.net/appcore/fractal/ttr
Now, i0 and i1 have their proper centers wrt radd radius. Lets go ahead and plot them in purple using a radius of radd:
plot.circle(i0.c, radd, CT_CAIRO_RGB(1.0, 0.0, 1.0));
plot.circle(i1.c, radd, CT_CAIRO_RGB(1.0, 0.0, 1.0));
BAM! They are tangent to the circles in red!
;^D
Also, this works for circles of different sizes and different values of radd. The attached renderings will show some of this.
This is a perfect medium to build a tangent circle fractal.
Any thoughts?
___
#Fractal #Circle #Intersection
‹




›
2016-11-17
4 Photos - View album
Chris “M” ThomassonOwnerOne can do this with a compass and paper. Nice!Nov 18, 2016