How do I find a tangent line of a closed curve, with a certain direction?

tangents in (12.7 KB)

Hello, I’m looking for a way to find instances of a certain tangent direction within a closed curve.
In the attached document, I am looking for a way to find the points on a curve, where the direction of the curve aligns with the unit Z vector.
The attached document is too unprecise and too computationally heavy, since it simply divides the curve into thousands of points and finds the points where the tangent direction is closest to the tangents i want.
I was wondering if there is a better way to solve this problem?

Thank you for reading.

1 Like

It’s the italian forum, but it should be useful to you:

1 Like

Here is C# solution for curves in XZ plane (any XZ parallel plane).
It will work with “smooth” curves. But it probably will NOT work with self-intersecting curves and WILL NOT work with curves that have SWIRLY segments.
tangents in curve (31.0 KB)

1 Like

Hi @hc_svane, below is another way without divisions. The example finds the points on a curve in the XY plane where the tangents are parallel to the Y-Axis. You might change the vector. (12.4 KB)