Grasshopper

algorithmic modeling for Rhino

# How to Make Custom Curvature Graph

Hi all,

I am trying to break a closed curve (lets call this c0) into a series of segments based on its curvature. I want to get the parameter where either of these two things happens:

1) The curvature has a sharp break

2) The Curvature "flips"

The curvature graph component creates exactly what I need, but unfortunately it only visualizes the new curve (lets call this c1), without actually making it usable. If it were usable, I could just test for curve-curve intersections, and discontinuities in (c1). I have more or less replicated the behavior of the curvature graph component, except that my imitation is too smooth (lets call my imitation curve c2). I attached two images to demonstrate what I mean.

Is there a way to get exactly what the Curvature graph makes? How is it creating c1? Is it just a much larger sampling of points? Or does it somehow operate (calculus?) on the underlying formula of the curve (c0)?

Any guidance is hugely appreciated.

Views: 678

Attachments:

### Replies to This Discussion

Hi Matthew

this task can be accomplished, but not via the Curvature Graph functionality. In fact, that function is only meant for display, and not for exporting values.

I think you can get this via Curve.GetNextDiscontinuity. Please have a look at that.

You'll need to evaluate the whole domain of the curve. I remember that there's a sample of this in the Python 101 tutorial.

I hope this helps getting you started,

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

I'll check it out, thank you!

by June Lee

by June Lee

by June Lee

by June Lee

• Add Photos
• View All

## Videos

• Add Videos
• View All

© 2024   Created by Scott Davidson.   Powered by