Finding Lowest Curvature Transition

I have a seemingly simple problem I would like to construct, which I am not getting my head around. maybe somebody has an idea or theoretic solution to this.

I have 2 black lines, which should be connected at A and B with the smoothest possible transition with the least amount of curvature change. The e marks the two tangents hitting each other. The resulting curve should of course not surpass the tangents.

I can of course make a blend curve and set it to curvature and tweak the leavers but how would I tweak them that they respect the given triangular in the best possible solution, also I dont want to actually tweak but want to have an exact and most likely the only real solution.

There are 2 examples: blue is a blend curve set to tangency with no change at the leavers. the green is the result of an arc blend which by feeling seems to fulfill the task already better. but getting the curve which delivers the smoothest transition seems not possible with a bit of a deeper understanding I assume. Maybe I need an iterative solution? Or maybe I am just tired and it is simple after all.


Hello - Do you want to minimize maximum curvature in the new curve or minimize change in curvature? A tangent transition as a single degree 3 seems be the cleanest if tangency is allowed. I’d make the blend with the curvature graph on so adjustments make some sense in terms of your curvature criteria.

-Pascal

hi @pascal thanks for having a look. A manual transition with the graphs turned on is something I want to avoid, since I am really looking for that one mathematical perfect solution.

I want to find the conversion at where the two tangents hit each other at the lowest possible change of continuity. With other words, imagine that somebody carries a glas of water on a skateboard at a certain speed and has to drive along a crossing and has to change the direction in the most subtle way possible endangering the water the least. Another example, when a plane changes course into landing position and wants the passengers to notice the least that he changes but has to change at a certain angle in a given time frame heading towards the runway. The triangular A, B, e is basically the room in which I can react. Too close to e and the change of direction will become abrupt. Too early at A or too late towards B and the transition will also be abrupt. So that one curve which is exactly in the “middle” of all that.

I experimented with manually making a transition with a degree 3 curve before, adding somewhere at the points A and B 2 cps to get a tangential, and to be sure that they hit the point. But where exactly to place the cps. Mathematically there is only one solution but how to construct it correctly…

@davidcockey I believe you are somehow involved with the maths, can you also help?

I’m not sure if there would be a perfect solution. Minimizing the transition will be increasing the maximum curvature:

@encephalon Some questions:

Are the lines planar? If not then the problem is much more complicated.

Assuming the lines are planar, do the lines if extended intersect between the ends of the lines?

What are the end end conditions?

  • Location and slope are continuous with the lines at each end

  • Location, slope and curvature are continuous with lines at each end (ie curvature is zero at the ends)

What is the objective?

  • Maximum curvature is minimized

  • Average curvature is minimized

  • Maximum rate of change of curvature is minimized

  • Average rate of change of curvature is minimized

Different combinations of objectives and end conditions will have different solutions.

You should check the Euler’s Spiral and the story behind it :wink: He was assigned the task to make Brittish railroad safer during turning, and he came up with this spiral to transition between straight and curved railroads in order to maximize the speed at which the train can travel during turning. Safest and most pleasing to the passengers, that is.

@Mahdiyar thanks for looking into it. In your example the beginning looks best, that is probably also because your vertex point is pretty much in the center of the ends. Towards the end of your animation the graph shows severe acceleration which I want to avoid. Meaning I am looking for a transition with the least possible acceleration and the least change in curvature.

@davidcockey thank you too for having a look into it.
yes the lines are planar the problem might be translated into a surface later. The lines intersect in the point e between the ends as shown above but it might not always be so, but that is not what I am looking for right now anyway.

the radius should converge to infinity/zero at that point.
the objective… hmm they all would actually be part of it. Does that make sense?

@ivelin.peychev that does actually look promising. That lead me to something called track transition curve which might be what I am after. I have no Idea how to geometrically translate that into my example though.

I appologise for not communicating my problem well enough, also the problem is not so trivial as I hoped so thanks to everybody lending me a few moments.

1 Like

You should perhaps also check some studies regarding finding of the best trajectories of racing (Formula 1) cars when taking different types of corners. It’s a mixture of forces they have to track in each moment in time in each point of the track.

It is by no means trivial, it’s a partial differential equation problem.

1 Like

yup actually did :slight_smile: but was not bold enough to bring it to the table since I am looking for somehting like an averaged racing line and I an not yet sure about that if thats even correct. thanks again!

Before I give up on that too fast, I approached it for now as @pascal suggested even though I wanted to avoid that, with the Curvature Graph. At least that I get an Idea of where it could go to. I figured arranging the control points along the triangular gives a pretty good result, no idea if that is the best approach but by manually kicking those points to and fro i managed to get transition with a visually very low change of acceleration, low curvature however one may call it. On the upper example i used a degree 5 curve which let me connect g2. the degree curve gave me curiously only a g1 on one side but it looks like it could be potentially calmer than the degree 5.

I still have no idea how to achieve smoothest transition - spot on - without having to dig up deeper maths though… any more ideas?

I am also posting the example file, maybe somebody could make a direct suggestion.

determine the lowest curvature.3dm (2.8 MB)

I’m still not sure of what exactly you want to accomplish.

hi, Ivelin, thanks again for having a look!

hah. I feel a bit ashamed but i have never used the conic curve before. What is it used for? But, and again sorry if my terminology is not correct, I am also not sure how i can describe it else, See the Screenshot from your video. The added red arrows point towards abrupt acceleration, in the lower one not so harsh but still visible.

What I am seeking for is a transition without this happening at all like i tried manually in my 2 examples, that the change of tangent happens without acceleration, continuous and equalised . One Key point i have figured is to have at least 3 control points which are located along the grey (tangent) triangular followed by having to (unfortunately) moving the cps along the triangular to achive an unaccelerated transition.

I think my example with the degree 5 shows the best result for now, which is also achievable with degree 4.

Hi @encephalon,

I think I understand, but to succeed in that I guess you need to create multiple straight sections connected with curves then each of these “curvature accelerations” will be “propagated” and thus reduced for each individual curvature.

Or perhaps multiple curved sections, which I believe Eurler’s spiral actually is.

If you want to take a deeper dive into this topic, I recommend having a look at Raph Levien’s thesis “From Spiral to Spline: Optimal Techniques in Interactive Curve Design”:

3 Likes

hi @ivelin.peychev can you make a quick, partial sketch? if that could be geometrically derived that would be probably very helpful in understanding what might be going on. i am currently messing around trying to understand relations even with parallelogram forces.

Eulers spiral is definitely an interesting contester. i wish it had a +++ in robustness if thats possible at all. I also found a variety of interesting curve types in that thesis shared by @DanielPiker, thanks for that. fun fact is that the Hobby Curve seems to get some attention currently in some software applications.

Bildschirmfoto 2020-05-11 um 14.08.24

thanks to everybody for contributing, thanks to you guys that topic is becoming like a rabbit hole for alice.

@encephalon,

I think I found a workflow that may work for you.

  1. create a conic (tangent start, tangent end)
  2. convert to arcs.
    repeat (optional)

image

image

image

image

image

image

image

I tried with arcblend before which probably results in the same discontinuing graph :thinking:

But playing with your conic curves once more brought me into something interesting. conic curves actually produce one weighted control point. When I take the weight out and change to degree 4, I only have to move the resulting middle control point to the tangent intersection, which is better than what I fiddled up before. That is still a bit of a hassle and probably difficult to remember, when i dont need it that often, but I can skip manually adjusting control points with the curvature graph.

what do you guys think, is that a good transition?

lowest curvature?.3dm (2.8 MB)

1 Like

@brian do you think it would make sense to make a “neutral” category non mac os or windows related based on something like “modeling theory”? I have seen quite a few of such interesting topics which discuss general ideas. maybe also having such “how to model” this and that topics just in one common category since mac and windows are actually so insignificantly different already in regards of modeling that it actually would really help.

3 Likes