Grasshopper

algorithmic modeling for Rhino

Hey guys,

I was trying to find lowest points on a landform(mesh) but could not figure it out via grasshopper, so I write a python script, hope this may help someone who has the same problem...

PS.I am trying to develop some geographic analysis tools using python in grasshopper. If you have some specific ideas(or problems) please let me know, we can work together!

Leo

Views: 869

Attachments:

Replies to This Discussion

Hi Kevin,

The idea of shortest path with grade limitations is cool. If I have time I will try writing it. I think the basic idea could be:

1. define a starting point on mesh StartPt

2. define an end point on mesh EndPt

3. set a slope limitation, e.g. 0.1

4. start checking 'neighborhood points' of StartPt, if it is smaller than 0.1, draw a line

5. loop 4

6. After every point added, check the distance from this point to the EndPt. If the distance is smaller than a number (let's say 5 meters), we say this is a trial option.

7. Return all of the possible trial, find the shortest one.

ps. this script might be inaccurate if the mesh is not fine enough. A better idea may be also check the points on each faces, but that may slow down the process.

Hope this helps.

Leo,

Here's my version of path finding guided by a slope parameters. There's both a directed (fixed start & end) single/ multi agent & non-directed single/ multi agent version. Both operate by a step size & slope % logic using the Anemone plugin.

Let me know if you have any thoughts on improving it.

Keith

Where is it Keith? 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service