Grasshopper

algorithmic modeling for Rhino

Hello all,

I have been looking for a way to do this without any results. I've tried a few things but nothing seems to work in this case. I'll explain.

I have a point cloud as you see in the image and I want to connect each point to the nearest point in the red line using only the roads. I was thinking something like an agent based simulation but honestly, not sure what would work best. 

Please let me know of a good strategy to proceed in doing this and any good examples/information to read as I am quite a beginner in Grasshopper.

Thanks.

Views: 2935

Replies to This Discussion

Hello Andreas,

I believe the Shortest Walk GH plugin is suitable for your problem.

What you will need to do is:

  • create the 2 groups of points (from & to)
  • Create a network of lines for the streets (the center line for each street).
  • For each point find the closest point on a street line.
  • Break the street lines into smaller chunks at intersections (and at the above points).
  • Create a line from each starting point to all the ending points.
  • Feed the two above into the [ShortestWalk] component.
  • Sort the output Walks by length and for each starting point keep only the shortest walk.

Here is an example with a few lines and points:

(once you have installed the shortest walk plugin(drag&drop the .gha file into grasshopper) you will find the component on the Curve/Util tab)

Attachments:

Thank for your help Niko,

I've tried the shortest walk plugin and it works when I do some tests but the main difficulty I'm having in implementing on my model is on step 2. That is getting the center point of all the streets. My full model is quite bigger than the screenshot I posted above so I'm looking a way to automate the procedure on having a line going through all the streets. Didn't have any success though. Best bet I've calculated the center point on each 'urban island' and then did a voronoi calculation which is not too far off the streets but I was thinking perhaps there is an easier way. One 'urban island' is not a single polyline but sometimes many. If I manage to figure this out I think the plugin will work! Let me know of your thoughts

I am guessing you have seen this too?

I am thinking, though, that instead of going into all this trouble it might be easier to try and find a street axis drawing somewhere online. If it is an existing city plan you are working on, that is...

Yes I've seen it and tried it but it doesn't work. I think the problem lies in the fact that the map file import I have is quite messed up. Some 'urban islands' are shaped from many polylines and/or have gaps. I've tried to close them by joining the curves then connecting the end points and then connecting again without any result. 

It is an existing city plan but there isn't a street axis drawing... maybe it is worth it to take a couple of days and do it manually...

This is perfect, thank you for sharing your GH definition.

I've tried a lot of plugin but nothing works.

geometry dash

A minute he bewildered, a minute I dreamed
Do not rush to make the rain fill my heart
To forget the heart, to the constant pain
Droplets of sad drops dropped on the soft, wet lashes.
Be together forever, my love  shell shockers

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service