what you can see in my drawing ist a grid of points. I want to interpolate from A to B and A to C for example. (Route 1: A start point, B endpoint), (Route 2: A start point, C end point).
I want to interpolate through one point in every single x column (diagonal is also okay for me) but at the end, I need the shortest possible curve from A to B.
Here is my file where I define start and endpoint at the end of the script. Tester.gh (43.8 KB)
Maybe someone can help with with the script or just the logic as well.
Thanks a lot for your help!
I donāt think so, because in A-star you donāt check every possible coordinate you mark the ones with increasing parameter values as DONāT GO THERE and you quickly find the path.
Searching algorithms are a hole new field to me.
I suspect that the Dijkstra algorithm has a negative consequence for performance, beacuse in complex contexts there are many āactorsā that has to be analysed by the algorithm.
I will study A* the next hours, so hopefully it works for me. Maybe I will come back to you later.
Until now, thanks a lot for your help.
One more question. Without being a computer scientist, where did you learn that kind of stuff? Is there anywhere a offical Python āAlgorithm Library of different kinds (Searching Algorithms, etc.)ā . I am new to Python, so I am not really shure where to sort this in the topic of rhino, grasshopper, python.
You could also implement a graph library, I like to use networkx in GHPython, uploaded a simple example of computing shortest paths on a RhinoCommon mesh here:
I personally learned by doing project Euler challenges and reading other peopleās solutions. Also see here for a bunch of Python algorithms. https://pygorithm.readthedocs.io/en/latest/
This is no generic rule. Image a bigger box between the start and end point as obstacle and you wonāt find the Route.
ā¦
About learning resources: I really enjoyed āthe coding trainā YouTube channel by Daniel Shiffman and his book āthe nature of codeā. Itās mostly written in processing, but itās easy to translate. He also has some path finding tutorials. The guy is super funny in my opinion
Guys, I am not able to implement the pseudocode example āA Starā into my script. Maybe someone can help me with the script. You can find the important part at the bottom of the script. Thanks a lot. Here is my new file: Tester.gh (47.0 KB)