Circle with TanTan and the abscissa of the circle to create

Hello,

I am trying to generate a circle from three parameters on Grasshopper:

  • A tangency curve.
  • A second tangency curve.
  • The abscissa of the circle to create.

Here is an example to be clearer:

Topic

The two tangency curves are in red and the line in red represents the line where the center of the circle to be generated can be found (constant abscissa between the two curves).

Thanks in advance for your help.

I don’t think there’s an explicit solution, so I went for bruteforce in C#.

CircleTanTanX.gh (5.8 KB)

2 Likes

Use circle tan tan component

would that be “Galapagos-able” in order to find the TanTan solution where center of the TanTanCircle is closest to the vertical line?


Galapagosable_is_a_word.gh (11.6 KB)

@magicteddy wow, will study your script! :+1:

I tried with Kangaroo but didn’t manage to include tangency options. Galapagos seems a good solution but is it possible to have it compite dynamically ?

@anon39580149 The problem with CircleTanTan is that the point is merely a guide to help the component find a solution, but there is no guarantee the final circle is actually centered on that point, nor on the same line.

@magicteddy Thank you very much for your answer and your Grasshopper file. This is exactly what I was looking to do.

@inno, thank you for the Galapagos solution. Actually @magicteddy it seems to me that Galapagos does not allow to have a dynamic grasshopper (if I’m not mistaken).

@anon39580149 , I had tried with this component but as @magicteddy says, the point is only an approximation. Only the tangents are kept.

If the tangent between two curve and the center of the circle must be a point on the line , this method may work fine but you need try it in different cases.
1- we create tween curve to find for example 1000 tangent circles,
2- we create a curve from circles centers and the intersection of the new curve with the line is the point we are looking for.

tangent.gh (11.6 KB)

Perhaps: find tangent vectors at intersection of curves and line; find normals (in direction of centerpoint), where the 2 normals intersect, that is the centerpoint of the circle tangent at the two desired points.

from what I understood the idea is to have the circle tangent to the two curves and its center to be somewhere on the vertical line.

geometrically this only happens when either, a) the two curves are parallel lines, or b) the line goes between the location of the shortest distance between the two curves