Tangent on Spline Tool

Good day,

Is it possible to create a tool that will find the tangent on a spline? One can select the tool, the spline, the axis point and drag it around to connect to the section of spline where the tangent point is required? Or, perhaps, select 2 points on the spline between which the tangent is required?

1 Like

Can I assume this is response in how to find the lowest point on a curve / spline? In which case it would be easier to just implement a tool to create a point at the lowest point of a curve / spine.

Yes. But it’s more complicated than an Intersect Arc / Circle & Tangent. Which is why I assume RT never implemented such tool. With a spline there can be multiple tangent points, and we’d have to have a way to select which tangent point we want. Unlike a circle which will have 2 tangent points, where the axis point HAS to be outside the circle. For ex: I did a quick spline with 3 loops and a point outside the spline to show approx where the tangent points are.


Then there’s the question - do we include tangent points when the axis crosses the spline itself - such as the green axis here?


Then - unlike with Arcs / Circles, there’s all the possibilties if the “Point” is “On” the spline.


I realise that. And the green line’s tangent would be a little to the right of where you have it to be a tangent, so it wouldn’t cross the spline’s line.

Would it be possible to choose only a section of the spline that we would want a tangent point on, instead of the whole spline? For example, we could select the section A2 to A1 instead of A2 to A4.

I know… this was meant as a sketch. not as a precise drawing. I didn’t feel like going back and forth by .05 to put it on the line. Not to mention the curve could be quite different than what I drew. :wink:

At this point - since there is no tool defined - we can do what ever we want. :slight_smile:

Me… I would just find all tangents, create a drop list that you could select from. Actually it’s the same sort of issue we have with the Intersect Curve & Axis, where we can only get the 1st intersect along the curve, when sometimes you may want the second (3rd etc) OR both so you can create a line between the 2. So maybe we could have a radio button First, Last, All? So in my sketch… First would be the Pink (A6) , last would be the Green (A8) , and all would be Pink, Red (A7), and Green. Might have to make the radio button only visible for the 1st time through the dialog, as you couldn’t have it create all the Points, and then at some edit to use the first, where some other tools use other points.


It sounds good to me :star_struck: I don’t mind how it works, but I do think it’s becoming a more & more necessary tool. Unless someone can teach me how to do it manually using the Tan function :laughing:

Unlike with a circle - has nothing to do with the Tan trig function. It has to do with solving for the (slope(s)) of a tangent from a given point to - in this case to a curve. Basically we’re into differntial calculus here.


By brute force using the builtin Qt graphic routines… given some accuracy factor… and just interate through drawing a line from the point starting at 0 degs, and incrementing by the accuracy (.01"?) and testing if it intersects() the curve. If it does, grab and save the intersect point coordinates, and continue until you reach 360 degs.

With a circle you could solve for the angle for the tangent line from an external point using Trig. In a nutshell this is the relationship of sin, cos, and tan.


But there’s an easy way uisng gemetry… finding the intesection(s) of 2 circles using the center, radius and external point. That’s what the app does.


I found a few sites that explain the geometry, but I have no idea of how to put it into practise and even less on how to use it in Seamly :cold_sweat::

oh, maaannn… I’ll have to go back to school & then university :rofl:


You can’t. For one you have to know the equation of the curve - which besides the fact it can change - you can’t get at the internals of the the app.

1 Like

That third reference is doing something quite different, and a lot easier. Given a point along a curve (for which there are existing tools using relative or absolute length) what is the tangent to the curve at that point.

This is something I do quite a lot. Just create a second point a tiny amount further along the curve and draw a line between them. The smaller the step along the curve the more accurate the tangent; you could even create two points a tiny amount to either side of your starting point.

Does that help? Do you have an example use case for this?

1 Like

Hi @MrDoo

I think the best example is the one on this topic: Lowest point of curve? - #21 by Scholli

I’ve been checking through the tools to see if there isn’t a tool, or a formula that one can use to find this point.

1 Like