Grasshopper

algorithmic modeling for Rhino

if i know 3 points, and the curvature of the start and end points,how can I get the tangent vector at these two points, and use the three points with "interpolate t curve" to construct a curve.

Views: 879

Replies to This Discussion

Yeah it's quite tricky to reverse engineer a tangent vector to match a certain curvature. There's code deep in Rhino that solves these cases but none of that has been exposed as Grasshopper components and probably not even as RhinoCommon methods.

Some approaches spring to mind:

  • Use Galapagos.
  • Generate N curves from clearly too little curvature to too much, measure the curvature for all of them, interpolate a curve through the curvature data, intersect with a line that represents the target curvature, find the X coordinate and then create a new tangent  vector with a length matching that X. Very involved, lots of work, lots of complexity.
  • Write a script that binary-searches for the ideal tangent vector, this will probably be quite fast, though if you have to do it for both ends of a curve then it will be much harder if there aren't enough control-points in between.

--

David Rutten

david@mcneel.com

Thank you for your patient reply! David!

I don't exactly know how Galapagos can help in this situation.

Thanks!

I read a bit about some maths knowledge, want to find a simple function about the relationship between tangent and curvature, but didn't find it.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service