TANGENCY for the INTERSECTION of 2 curves, not just a point on one curve

Stumped again with TYPE casting and array/domain ignorance…
My kingdom for a user guide on the topic…

Replace Control Points.gh (13.4 KB)

If the two curves are close enough, the error will be negligable
EDIT
This is not correct

Is this what you want?

Replace Control Points -b.gh (9.8 KB)

Well that was my original idea, but this is an attempt to solve this problem:

Tangent to Curves 001.gh (7.4 KB)

If you really want tangency then how about this?


Replace Control Points -really tangent.gh (12.2 KB)

2 Likes

Damn! Thats just astounding… Do you know how may weeks i have been grapping with this…
Using DIVIDE to break it into 3 pieces and then rebuilding with 6 control points and degree 3 with TANGENT at the ends is just genius
THANK YOU !!!

In thinking about this some more, I realize my method is flawed and so this great solution will result in tangency…

b

But not a tangent intersection

a

If the tangent start is disconnected
c

The challenge is to find the intersection with a linear method (without iteration) such that disconnecting the tangent start does not affect the resulting curve shape

This code demonstrates the problem. Connecting/Disconnecting the Tangent Start will show the challenge - to find Tangency based on the CURVE intersection, not just a point on the circle.

CircleTangency 001.gh (12.2 KB)

My current approach begins by making a number of tangent lines to the underlying curve:

The first appoximation gets me to within 1 degree of a right angle with the radius line, the second to 0.1 deg and the third to 90deg exactly to 3 dec places.
Increasing the number of tangent lines subdivision to above 400 is enough for 3 dec places of accuracy

In this real world problem, the circle is a curve, and none of the lines are coplanar. The match is done by projecting to the XY plane, and then back.
This has taken 31 vertical subdivisions on the Grasshopper workboard, which appear to be 3x the horizontal division, so what, 93 inches of spaghetti. Thats not trivial just to find a tangency without iteration

@Proterio Do you want a curve with each end of the curve tangent to a circle?

For any two specified points on the circles there are an infinite number of curves which are tangent to the circles to those points. For a NURBS curve the requirement is the first and last control points must be on the circles at the specified points, and the second and next to last control points are are lines tangent to the circles through the specified points.

In regular Rhino you could use BlendCrv with the BlendCrv=PointStart option. I don’t know if there is a Grasshopper equivalent. The result using BlendCrv is a single span degree 3 curve with 4 control points.

Also the curve could be tangent to any point on both circles. There is not a single fixed point for a curve to be tangent to.

This thread may be of help Blending Two Curves