How can I draw a arc, from 2 points and one tangential line

How can I draw a arc, from this 2 points and one tangential line(Line AB)

ArcTan2

do you know corresponding grasshopper component for that prompt?

P.S.


arc_tan_2024Apr14b.gh (11.6 KB)

P.P.S. Add Galapagos and “Bob’s your uncle” (solved!). :rofl:


arc_tan_2024Apr14c.gh (13.2 KB)

NOTE: I moved one of the points so the tangent point is different… When I restore the original points (used by version ‘a’ and ‘b’) the slider value with Galapagos is 0.60355

Hi Joseph,

There is actually a direct geometric solution for this so successive approximations can be avoided.

Here’s a partial solution, giving circles rather than arcs (given there are potentially six arcs per solution, depending on the positions of the points and any constraints on which arcs are permissible in this case, which wasn’t explicitly defined in the problem statement, the hard part is picking the arcs from the possibilities).


Circles Pt Pt Tan.gh (13.0 KB) [EDIT: I’ve replaced the original gh file with one that doesn’t require the Treesloth plugin]

The geometry is nicely illustrated here: Construction of a circle through two points and tangent to a given line – GeoGebra

2 Likes

But not with standard GH components? Your geometry is not internalized.

missing

P.S. I “fixed” your cluster:

Circles Pt Pt Tan_2024Apr14a
Circles Pt Pt Tan_2024Apr14a.gh (9.3 KB)

P.P.S. The geometric construction is certainly interesting - I love geometry - but the results are two branches, each with two circles. The branches appear to be duplicates? And one of the two circles doesn’t touch the line, so could be culled out, based on curve proximity rather than circumference because it’s not always the smaller circle depending on point positions.

Oh, sometimes both circles are tangent to the line? Cool.

Circles Pt Pt Tan_2024Apr14a4

This doesn’t change your cluster but adds culling based on curve proximity. Depending on point positions relative to the line, one or both circles will lose their color when they don’t touch the line (within given ‘Tolerance’ vaue).


Circles Pt Pt Tan_2024Apr14b.gh (26.7 KB)

1 Like

Argh, I always forget that First/Last isn’t native gh. It really ought to be.

I think this is because in replacing First/Last with Item you’ve connected both values to Dist - you only need one connected (the two points, P, are equidistant from Pt 1).
image

Yep. And if the line is infinite there will always be two circles that are tangential to it (provided the points are on the same side of the line - there is no tangential solution if they are on opposite sides), except for the special case of two points on a line parallel to the given line, when there is only one circle.

I guess duplicate results are better than no results. Can’t replicate a component I don’t have.

If the line goes between the points there is no solution.

Indeed, as I said two posts up!

Wow guys Thank you! It really helped me alot !

1 Like