Grasshopper

algorithmic modeling for Rhino

Hello,

I'm working on a definition to find a curve's closet point to a list of points.  I'm having the issue of analyzing multiple curves to multiple points.  The result I am looking for is to identify the closet curve to a point and extract the vector of that curve (blue line) to rotate a primitive shape(green shape) relative to the closet curve.  

Thanks,

JM  

 

Views: 711

Attachments:

Replies to This Discussion

Hello Johnson,

is this what you are after?

Attachments:

Hello Nikos Tzar,

That's exactly what I was trying to figure out.  I really appreciate your help.  

Do you think it is possible to extract vector information from (2) curves closet to point to get a median value to create more of a fluid pattern?  My understand of how your solution works would mean I only need to extract the the 2nd lowest value from the list and compare it to the 1st lowest value to extract the median vector.  

Thanks,

Exactly, you can get the second item from the list and add the two vectors. With a slider you can define their amplitude and this way you can control how much each vector affects the rectangle (0=second vector, 1=first vector)

Only problem is that when the closest point is at the end of a line then the vector (thus the rectangle) is not perepndicular to the line and this creates some strange rotations (you can see that on the rectangles near the edges of the surface). But this was an issue in the previous definition as well... If this bothers you you could probably solve it by getting the closest line and turning this into a vector instead of getting the closest point and finding the vector from this...

forgot the file:

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service