Grasshopper

algorithmic modeling for Rhino

I have a few definitions to find the Quad Snap Points of nurbs curves. Unfortunately I am not able to build one that is fast and finds all points for all curves. In the definition attached both solutions find all points for the right curve, but not for the left one. Does someone perhaps know a right/better way to do this?

Views: 1718

Replies to This Discussion

Olaudah:

WTF is a turning point? Inflection points, sure, but those points you show don't seem meaningful.

And you are invoking within your script via Rhinocommon one of the most obscure command of all, Greville parameters:

http://4.rhino3d.com/5/rhinocommon/?topic=html/M_Rhino_Geometry_Nur...

I believe that in plain English this means finding the most boring curve points possible? Where the lease variation in curvature occurs? That's like a derivative in calculus, or the reverse Fourier transform of it. And isn't there a threshold effect where many more points can be included as most boring?

And why are you rebuilding the left curve, you didn't show, with 50 control points?

And there's all these boxes:

Why?

ouch!

You mean those points where the curve goes vertical or horizontal, as with the Quad snap?

It's an interesting problem and I don't know how to solve it analytically, or even with extreme accuracy while using pure GH, but you can get to any desired accuracy by sampling more points in my attached solution.

The idea is this:

  1. Sample the tangent of the curve at N locations (I picked 1000).
  2. Get the X and Y components of all these tangent vectors.
  3. Create two new curves, where the X component comes from the original curve parameters and the Y component comes from the tangent x and y values.
  4. Intersect these two curves with the world X-axis to find all the roots.
  5. The x-coordinate of all root points will tell you at what curve parameters the quad points are.

Attachments:

Somehow I thought using the Extremes (X-tremez) component (from Curve > Analysis tab) could be part of a solution, but I clearly misunderstood the component... and maybe the question aswell... or?

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service