Grasshopper

algorithmic modeling for Rhino

Hi all,

I'm trying to find a closest point. I got one fixed point, point A, which is the starting point for a line with a fixed length. The second point, point B, can only move in the Z-direction. I made a script, see attachment, where the end point of the fixed line and point B should meet. Once I run Galapagos and it finishes the analysis there is no result. 

Im looking for a point C, which consists of point B with a new Z-value and and the end of the constructed line with a given value.

Can anyone help me out?

Thanks,

Ari

Views: 837

Attachments:

Replies to This Discussion

Hi Arjen,

you were measuring the wrong distance. Namely the distance between a point and the projection of another point onto the first point. This distance is always zero, and thus there was nothing for Galapagos to optimize because no matter what it tried, every setup had the same fitness.

I changed your file to measure the correct distance:

Attachments:

Incidentally, this particular problem can be solved without resorting to galapagos, you can intersect a sphere with a vertical ray to find the intersection point directly.

Thanks David, that solved the problem. The second way to solve it is even easier, I wonder why I didn't think of that.

Cheers

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