As you can see, the curve segment in the foreground has one end which is not orthogonal. In the background, I have manually extended it until it became orthogonal. I want to keep the shape of the current curve segment, but extend it (like with the “open corner” function).
How would this work mathematically? Essentially, I am looking for the “offset” argument in the openCornerAtNode_offset_() function for the resulting curve to become orthogonal at both ends (I am unsure whether this is the correct terminology, please advise).
Hello again. I tried the above, but sadly, it looks like it won’t calculate path times greater than 1 (or smaller than 0). I specifically need it to calculate the vertical/horizontal extreme location path time outside of the existing segment. Currently, it will only give maxint if the segment doesn’t have an extreme:
Or am I missing something? I would really dislike elongating the segment in order to then test it. Is there no way of calculating the exact time value by which I need to elongate the segment in order to achieve an extreme?
That would save the annoying hassle of first initialising a new segment with these points to then use its extremePoints/extremeTimes method.
Edit, yet another bonus:
Add an argument for whether the italic angle should be taken into account for finding vertical extremes. Currently, only turly vertical extremes are given, but it would be immensely useful to be able to get the italic extremes as well.
Or, maybe more adaptable: A function that returns points/times for a given angle.
In order to calculate the point at which the curve becomes vertical you need to look at the derivative. If you ever heard about derivatives of functions like f(x) you will surely understand derivatives of Bézier curves. They are surprisingly easy and can be very handy.
Thanks Tim. I’m afraid I’m really struggling to catch up on maths (which I hated at school, sadly), but I’ll look into derivatives.
I’m afraid I don’t have the time right this moment to do so and am in desperate need of finding a way to calculate the path time at which a Bézier curve reaches a certain angle (like finding its H/V extremes, just with arbitrary angles). Any chance you would have an idea off the top of your head?