I have a project with a lot or tangent curve conditions and have been struggling with the following:
Could, anyone, think of a method to generate an arc tangent to 3 circles this way?
I have 3 blue circles with numbers slider for radiuses, and want to generate the
tangent arc - red.
Interesting. Nice work. But… it’s never a good practice to connect a bunch of wires like that when their sequence is important. Better to use a Merge component with explicit sequence of wires or, in this case, a cluster where each input is labeled.
You totally right. I realized I did not know that P parameter controls how
the tangents are arranged.
And I’m still not fully certain how that parameter works. I just see that
the resulting circle has the center close to the “guide point” (P).
Is there a specific rule how P operates?
how did you develop or find those crazy formulas ?
x = ((((aR+(aY*(-1))+cR+cY)*(aR+aY+cR+(cY*(-1)))*(bX)^(3))+(((aR)^(2)+((aY)^(2)*(-1))+(cR*bR*(-1))+(cY*bY*(-1))+(((bR*(-1))+cR)*aR)+((bY+cY)*aY))*cX*(bX)^(2)*(-1))+((bR+(bY*(-1))+cR+cY)*(bR+bY+cR+(cY*(-1)))*(aX)^(3))+(((cR*bR)+(cR)^(2)+((cX)^(2)*(-1))+(cY*bY)+((cY)^(2)*(-1))+((bR+cR)*aR)+(((bY*(-1))+cY)*aY))*(aR+(aY*(-1))+(bR*(-1))+bY)*(aR+aY+(bR*(-1))+(bY*(-1)))*cX*(-1))+(((cR*bY)+(cY*bR)+(((bR*(-1))+(cR*(-1)))*aY)+((bY+(cY*(-1)))*aR))*(((((bR)^(2)*(-1))+(bX)^(2)+(bY)^(2)+(cR*bR*(-2))+((cR)^(2)*(-1))+(cX*bX*(-2))+(cX)^(2)+(cY*bY*(-2))+(cY)^(2))*((aR)^(2)+((aX)^(2)*(-1))+((aY)^(2)*(-1))+(cR*aR*2)+(cR)^(2)+(cX*aX*2)+((cX)^(2)*(-1))+(cY*aY*2)+((cY)^(2)*(-1)))*((aR)^(2)+((aX)^(2)*(-1))+((aY)^(2)*(-1))+(bR*aR*(-2))+(bR)^(2)+(bX*aX*2)+((bX)^(2)*(-1))+(bY*aY*2)+((bY)^(2)*(-1)))))^(1/2))+((((((aR)^(2)*(-1))+(aY)^(2)+(cR*bR)+(cY*bY)+((bR+(cR*(-1)))*aR)+(((bY*(-1))+(cY*(-1)))*aY))*(cX)^(2))+((((bR)^(2)*(-1))+(cR*bR*(-1))+((bR+cR)*aR)+((bY+(cY*(-1)))*bY)+(((bY*(-1))+cY)*aY))*(aR+(aY*(-1))+cR+cY)*(aR+aY+cR+(cY*(-1)))))*bX)+((((bR+(bY*(-1))+cR+cY)*(bR+bY+cR+(cY*(-1)))*((aR)^(2)+((aY)^(2)*(-1))+(cR*bR*(-1))+(cY*bY*(-1))+(((bR*(-1))+cR)*aR)+((bY+cY)*aY))*(-1))+((((bR)^(2)*(-1))+(cR*bR*(-1))+((bR+cR)*aR)+((bY+(cY*(-1)))*bY)+(((bY*(-1))+cY)*aY))*(cX)^(2))+(((cR*bR*(-1))+((cR)^(2)*(-1))+(cY*bY*(-1))+(cY)^(2)+(((bR*(-1))+(cR*(-1)))*aR)+((bY+(cY*(-1)))*aY))*(bX)^(2)))*aX)+((((((bR)^(2)*(-1))+(cR*bR*(-1))+((bR+cR)*aR)+((bY+(cY*(-1)))*bY)+(((bY*(-1))+cY)*aY))*cX)+(((cR*bR*(-1))+((cR)^(2)*(-1))+(cY*bY*(-1))+(cY)^(2)+(((bR*(-1))+(cR*(-1)))*aR)+((bY+(cY*(-1)))*aY))*bX))*(aX)^(2)))*((((aR+(aY*(-1))+(bR*(-1))+bY)*(aR+aY+(bR*(-1))+(bY*(-1)))*(cX)^(2)*2)+((aR+(aY*(-1))+cR+cY)*(aR+aY+cR+(cY*(-1)))*(bX)^(2)*2)+(((aR)^(2)+((aY)^(2)*(-1))+(cR*bR*(-1))+(cY*bY*(-1))+(((bR*(-1))+cR)*aR)+((bY+cY)*aY))*cX*bX*(-4))+((bR+(bY*(-1))+cR+cY)*(bR+bY+cR+(cY*(-1)))*(aX)^(2)*2)+((((cR*bY)+(cY*bR)+(((bR*(-1))+(cR*(-1)))*aY)+((bY+(cY*(-1)))*aR)))^(2)*2)+((((((bR)^(2)*(-1))+(cR*bR*(-1))+((bR+cR)*aR)+((bY+(cY*(-1)))*bY)+(((bY*(-1))+cY)*aY))*cX*4)+(((cR*bR*(-4))+((cR)^(2)*(-4))+(cY*bY*(-4))+((cY)^(2)*4)+(((bR*(-4))+(cR*(-4)))*aR)+(((bY*4)+(cY*(-4)))*aY))*bX))*aX)))^((-1)))
y = ((((aR+(aX*(-1))+cR+cX)*(aR+aX+cR+(cX*(-1)))*(bY)^(3))+(((aR)^(2)+((aX)^(2)*(-1))+(cR*bR*(-1))+(cX*bX*(-1))+(((bR*(-1))+cR)*aR)+((bX+cX)*aX))*cY*(bY)^(2)*(-1))+((bR+(bX*(-1))+cR+cX)*(bR+bX+cR+(cX*(-1)))*(aY)^(3))+(((cR*bR)+(cR)^(2)+(cX*bX)+((cX)^(2)*(-1))+((cY)^(2)*(-1))+((bR+cR)*aR)+(((bX*(-1))+cX)*aX))*(aR+(aX*(-1))+(bR*(-1))+bX)*(aR+aX+(bR*(-1))+(bX*(-1)))*cY*(-1))+(((cR*bX*(-1))+(cX*bR*(-1))+((bR+cR)*aX)+(((bX*(-1))+cX)*aR))*(((((bR)^(2)*(-1))+(bX)^(2)+(bY)^(2)+(cR*bR*(-2))+((cR)^(2)*(-1))+(cX*bX*(-2))+(cX)^(2)+(cY*bY*(-2))+(cY)^(2))*((aR)^(2)+((aX)^(2)*(-1))+((aY)^(2)*(-1))+(cR*aR*2)+(cR)^(2)+(cX*aX*2)+((cX)^(2)*(-1))+(cY*aY*2)+((cY)^(2)*(-1)))*((aR)^(2)+((aX)^(2)*(-1))+((aY)^(2)*(-1))+(bR*aR*(-2))+(bR)^(2)+(bX*aX*2)+((bX)^(2)*(-1))+(bY*aY*2)+((bY)^(2)*(-1)))))^(1/2))+((((((aR)^(2)*(-1))+(aX)^(2)+(cR*bR)+(cX*bX)+((bR+(cR*(-1)))*aR)+(((bX*(-1))+(cX*(-1)))*aX))*(cY)^(2))+((((bR)^(2)*(-1))+(cR*bR*(-1))+((bR+cR)*aR)+((bX+(cX*(-1)))*bX)+(((bX*(-1))+cX)*aX))*(aR+(aX*(-1))+cR+cX)*(aR+aX+cR+(cX*(-1)))))*bY)+((((bR+(bX*(-1))+cR+cX)*(bR+bX+cR+(cX*(-1)))*((aR)^(2)+((aX)^(2)*(-1))+(cR*bR*(-1))+(cX*bX*(-1))+(((bR*(-1))+cR)*aR)+((bX+cX)*aX))*(-1))+((((bR)^(2)*(-1))+(cR*bR*(-1))+((bR+cR)*aR)+((bX+(cX*(-1)))*bX)+(((bX*(-1))+cX)*aX))*(cY)^(2))+(((cR*bR*(-1))+((cR)^(2)*(-1))+(cX*bX*(-1))+(cX)^(2)+(((bR*(-1))+(cR*(-1)))*aR)+((bX+(cX*(-1)))*aX))*(bY)^(2)))*aY)+((((((bR)^(2)*(-1))+(cR*bR*(-1))+((bR+cR)*aR)+((bX+(cX*(-1)))*bX)+(((bX*(-1))+cX)*aX))*cY)+(((cR*bR*(-1))+((cR)^(2)*(-1))+(cX*bX*(-1))+(cX)^(2)+(((bR*(-1))+(cR*(-1)))*aR)+((bX+(cX*(-1)))*aX))*bY))*(aY)^(2)))*((((aR+(aX*(-1))+(bR*(-1))+bX)*(aR+aX+(bR*(-1))+(bX*(-1)))*(cY)^(2)*2)+((aR+(aX*(-1))+cR+cX)*(aR+aX+cR+(cX*(-1)))*(bY)^(2)*2)+(((aR)^(2)+((aX)^(2)*(-1))+(cR*bR*(-1))+(cX*bX*(-1))+(((bR*(-1))+cR)*aR)+((bX+cX)*aX))*cY*bY*(-4))+((bR+(bX*(-1))+cR+cX)*(bR+bX+cR+(cX*(-1)))*(aY)^(2)*2)+((((cR*bX)+(cX*bR)+(((bR*(-1))+(cR*(-1)))*aX)+((bX+(cX*(-1)))*aR)))^(2)*2)+((((((bR)^(2)*(-1))+(cR*bR*(-1))+((bR+cR)*aR)+((bX+(cX*(-1)))*bX)+(((bX*(-1))+cX)*aX))*cY*4)+(((cR*bR*(-4))+((cR)^(2)*(-4))+(cX*bX*(-4))+((cX)^(2)*4)+(((bR*(-4))+(cR*(-4)))*aR)+(((bX*4)+(cX*(-4)))*aX))*bY))*aY)))^((-1)))
r = ((((((aX)^(2)+(aY)^(2)+(cX*bX)+(cY*bY)+(((bX*(-1))+(cX*(-1)))*aX)+(((bY*(-1))+(cY*(-1)))*aY))*cR*bR*4)+((((aX)^(2)*2)+((aY)^(2)*2)+(bX*aX*(-4))+((bX)^(2)*2)+(bY*aY*(-4))+((bY)^(2)*2))*(cR)^(2))+((((aX)^(2)*2)+((aY)^(2)*2)+(cX*aX*(-4))+((cX)^(2)*2)+(cY*aY*(-4))+((cY)^(2)*2))*(bR)^(2))+((((bX)^(2)*2)+((bY)^(2)*2)+(cX*bX*(-4))+((cX)^(2)*2)+(cY*bY*(-4))+((cY)^(2)*2))*(aR)^(2))+((((cX*bY*(-1))+(cY*bX)+(((bX*(-1))+cX)*aY)+((bY+(cY*(-1)))*aX)))^(2)*(-2))+((((((bX)^(2)*(-1))+(cX*bX)+((bX+(cX*(-1)))*aX)+((bY+(cY*(-1)))*aY)+((bY+(cY*(-1)))*bY*(-1)))*cR*(-4))+(((cX*bX*4)+((cX)^(2)*(-4))+(cY*bY*4)+((cY)^(2)*(-4))+(((bX*(-4))+(cX*4))*aX)+(((bY*(-4))+(cY*4))*aY))*bR))*aR)))^((-1))*((((aX)^(2)+(aY)^(2)+(cX*aX*(-2))+(cX)^(2)+(cY*aY*(-2))+(cY)^(2))*(bR)^(3))+(((aX)^(2)+(aY)^(2)+(cX*bX)+(cY*bY)+(((bX*(-1))+(cX*(-1)))*aX)+(((bY*(-1))+(cY*(-1)))*aY))*cR*(bR)^(2))+(((bX)^(2)+(bY)^(2)+(cX*bX*(-2))+(cX)^(2)+(cY*bY*(-2))+(cY)^(2))*(aR)^(3))+((((cR)^(2)*(-1))+(cX*bX*(-1))+(cX)^(2)+(cY*bY*(-1))+(cY)^(2)+((bX+(cX*(-1)))*aX)+((bY+(cY*(-1)))*aY))*((aX)^(2)+(aY)^(2)+(bX*aX*(-2))+(bX)^(2)+(bY*aY*(-2))+(bY)^(2))*cR)+(((cX*bY*(-1))+(cY*bX)+(((bX*(-1))+cX)*aY)+((bY+(cY*(-1)))*aX))*(((((bR)^(2)*(-1))+(bX)^(2)+(bY)^(2)+(cR*bR*(-2))+((cR)^(2)*(-1))+(cX*bX*(-2))+(cX)^(2)+(cY*bY*(-2))+(cY)^(2))*((aR)^(2)+((aX)^(2)*(-1))+((aY)^(2)*(-1))+(cR*aR*2)+(cR)^(2)+(cX*aX*2)+((cX)^(2)*(-1))+(cY*aY*2)+((cY)^(2)*(-1)))*((aR)^(2)+((aX)^(2)*(-1))+((aY)^(2)*(-1))+(bR*aR*(-2))+(bR)^(2)+(bX*aX*2)+((bX)^(2)*(-1))+(bY*aY*2)+((bY)^(2)*(-1)))))^(1/2))+((((((aX)^(2)*(-1))+((aY)^(2)*(-1))+(cX*bX*(-1))+(cY*bY*(-1))+((bX+cX)*aX)+((bY+cY)*aY))*(cR)^(2))+((((bX)^(2)*(-1))+(cX*bX)+((bX+(cX*(-1)))*aX)+((bY+(cY*(-1)))*aY)+((bY+(cY*(-1)))*bY*(-1)))*((aX)^(2)+(aY)^(2)+(cX*aX*(-2))+(cX)^(2)+(cY*aY*(-2))+(cY)^(2))))*bR)+(((((bX)^(2)+(bY)^(2)+(cX*bX*(-2))+(cX)^(2)+(cY*bY*(-2))+(cY)^(2))*((aX)^(2)+(aY)^(2)+(cX*bX)+(cY*bY)+(((bX*(-1))+(cX*(-1)))*aX)+(((bY*(-1))+(cY*(-1)))*aY))*(-1))+((((bX)^(2)*(-1))+(cX*bX)+((bX+(cX*(-1)))*aX)+((bY+(cY*(-1)))*aY)+((bY+(cY*(-1)))*bY*(-1)))*(cR)^(2))+(((cX*bX)+((cX)^(2)*(-1))+(cY*bY)+((cY)^(2)*(-1))+(((bX*(-1))+cX)*aX)+(((bY*(-1))+cY)*aY))*(bR)^(2)))*aR)+((((((bX)^(2)*(-1))+(cX*bX)+((bX+(cX*(-1)))*aX)+((bY+(cY*(-1)))*aY)+((bY+(cY*(-1)))*bY*(-1)))*cR*(-1))+(((cX*bX)+((cX)^(2)*(-1))+(cY*bY)+((cY)^(2)*(-1))+(((bX*(-1))+cX)*aX)+(((bY*(-1))+cY)*aY))*bR))*(aR)^(2))))
thanks for some background info behind this magic.
kind regards -tom
I use those software programs as a hobbyist, just like I use Rhino for my hobby.
I have to say that “Geometry Expressions” is very outdated. (for example 32-bit). It has quirks and crashes often. On the other hand, the program is unique, there is no comparable software. It is based on symbolic calculations and constraints. “Geogebra” for example is not based on constraints and cannot calculate the presented geometry as symbols. Furthermore, “Geogebra” is of course great and can do many things much better than “Geometry Expressions”.
I also use “Maple” to simplify the formulas. It probably won’t be simpler than the formulas I used here.
The formulas used here are for this specific situation. It may even be necessary to swap circle A and B, for the following reason: some formulas work with triangles (circle centers) A B C (clockwise) and some with triangle A C B (counterclockwise).
I am thinking about a general Grasshopper definition for tantantan with logic. In the example above that would be: “the tangent circle is around circle A and B, and is outside circle C”. It is difficult because circles can also overlap. The tangent circle can therefore be in, around or outside A, B or C. If the tangent circle is in A and B, A and B overlap. It will take a while before I have made it.
But in any case; nice that I could help you.
@Tom_P , Your illustration shows that there are many possibilities. And this does not even show the overlapping situations.