Get curve maximum curvature points

Hello,

Anyone know how to get the points of maximum curvature for a curve? I can get the inflection points by making the angle diff between tangents, and next iterate the segments to get the max curvature for each segment but it doesn’t seem to be the most efficient technique.

Thanks and regards

If you have a copy of the Rhino WIP, you might try Rhino.Geometry.Curve.ExtremeParameters.

Hi Dale,

Thanks for your quick answer, as always! the point is I would like to do it for a Rhino 5 plugin.
I guess I will have to do it by approach :slight_smile:

Thank you anyway.

Best regards

Hi,

Is there a solid way that gets you the precise max / min points? I’ve been looking for online literature about it but haven’t found anything useful. At the moment I am iteratively sampling the curve’s domain, so it can take a while to get a reasonable result…

There is a way - and we’ve added a method to RhinoCommon in the Rhino WIP to do this.

Rhino.Geometry.Curve.ExtremeParameters

Hi dale,

Thanks for that, I saw it mentioned somewhere else, but I’m not sure how to
get the newer Rhinocommon? Is the WIP mature enough to switch over? Or is
there a way to use the new Rhinocommon with Rhino 5?

Much thanks!

Tom Svilans, M. Arch.

m: +44 (0)75 1926 0882
e: tom.svilans@gmail.com
w: tomsvilans.com

··· On Thu, Mar 17, 2016 at 4:36 PM, Dale Fugier wrote:

dale http://discourse.mcneel.com/users/dale McNeel
March 17

tom_svilans:

Is there a solid way that gets you the precise max / min points?

There is a way - and we’ve added a method to RhinoCommon in the Rhino WIP
to do this.

Rhino.Geometry.Curve.ExtremeParameters

Visit Topic
http://discourse.mcneel.com/t/get-curve-maximum-curvature-points/28693/5
or reply to this email to respond

In Reply To
tom_svilans http://discourse.mcneel.com/users/tom_svilans
March 17
Hi, Is there a solid way that gets you the precise max / min points? I’ve
been looking for online literature about it but haven’t found anything
useful. At the moment I am iteratively sampling the curve’s domain, so it
can take a while to get a reasonable result…

Visit Topic
http://discourse.mcneel.com/t/get-curve-maximum-curvature-points/28693/5
or reply to this email to respond

To stop receiving notifications for this particular topic, click here
http://discourse.mcneel.com/t/get-curve-maximum-curvature-points/28693/unsubscribe.
To unsubscribe from these emails, change your user preferences
http://discourse.mcneel.com/my/preferences

Why don’t you ask those on Serengeti?

http://discourse.mcneel.com/c/serengeti

Ah, wasn’t aware of that. Cheers!

Tom Svilans, M. Arch.

m: +44 (0)75 1926 0882
e: tom.svilans@gmail.com
w: tomsvilans.com

··· On Thu, Mar 17, 2016 at 5:49 PM, Dale Fugier wrote:

dale http://discourse.mcneel.com/users/dale McNeel
March 17

tom_svilans:

Is the WIP mature enough to switch over?

Why don’t you ask those on Serengeti?

http://discourse.mcneel.com/c/serengeti

Visit Topic
http://discourse.mcneel.com/t/get-curve-maximum-curvature-points/28693/7
or reply to this email to respond

In Reply To
tom_svilans http://discourse.mcneel.com/users/tom_svilans
March 17
Hi dale, Thanks for that, I saw it mentioned somewhere else, but I’m not
sure how to get the newer Rhinocommon? Is the WIP mature enough to switch
over? Or is there a way to use the new Rhinocommon with Rhino 5? Much
thanks! Tom Svilans, M. Arch. m: +44 (0)75 1926 0882 e:
tom.svilans@gmail.c…

Visit Topic
http://discourse.mcneel.com/t/get-curve-maximum-curvature-points/28693/7
or reply to this email to respond

To stop receiving notifications for this particular topic, click here
http://discourse.mcneel.com/t/get-curve-maximum-curvature-points/28693/unsubscribe.
To unsubscribe from these emails, change your user preferences
http://discourse.mcneel.com/my/preferences

Hi there,

Sorry for resurrecting that thread, but there’s still something I don’t get with the ‘ExtremeParameters’ method.

What I want to achieve: get the curvature extremas parameters displayed by the ‘Curvature’ command (aka. max. curvature points, for both planar and 3D curves) into Rhinocommon.

Curve.ExtremeParameters requires a 3d vector:
image
What is that vector excatly for? The doc is not so much explaining IMO…
I understand, that this vector determines in which order the output parameters are sorted in the returned array, but I does not seem to be the case, as different vectors output completely different parameters arrays…

As a result, the ‘ExtremeParameters’ method always returns different points (round points) that the ‘Curvature’ command does (white squares):


Any explanation will be welcome!

Hi @jeffoulet

The functions need to know what axis to calculate the extreme points. For example, with the original image, the axis would be the world x-axis.

– Dale

Hi @dale,

Thank you for the explanation but I still have the feeling to be off the track…
Why does ‘ExtremeParameters’ require a direction vector as the Rhino ‘Curvature’ command is not prompting for anything?
The curve’s local maximum curvature locations should be independent from any direction: if I have two copies of one curve, but one of them rotated, the ‘Curvature’ command always indicates me the maximal curvature location to be at the same place:


Or maybe we are just not talking about the same thing?

What I definitely need is the Rhinocommon method underlying the Rhino ‘Curvature’ command.

Hi @jeffoulet.

ExtremeParameters returns local extrema. The Curvature command marks inflection points.

Does this help?

SampleCsExtractInflectionPoints.cs

– Dale

Hi @dale,

Many thanks, It helps a lot to understand the logic use to find the inflection points.

However, I’m looking for max. curvature positions (the white dots of the ‘Curvature’ command), both for 2D and 3D curves.

Here’s one proposed method:


It numerically constructs the hodograph of the curve and solves the locations of curvature extremes by geometrically finding the hodograph intersections with the x-axis.

I was wondering if there is any nicer method to get these points. I assume the ‘Curvature’ command does not proceed as the above proposed grasshopper definition.

Hi @jeffoulet,

Ah yes, sorry about that. Here is what you are looking for:

SampleCsExtractMinMaxRadiusPoints.cs

It seems reasonable that RhinoCommon would have curve methods that would do this for you. I’ve added the ‘wishes’ to the pile.

https://mcneel.myjetbrains.com/youtrack/issue/RH-53747

– Dale

2 Likes

Hi @dale,

Thanks a lot! Works like a charm :slight_smile:

I must now wrap my head around that algorithm…

RH-53747 is fixed in the latest WIP