algorithmic modeling for Rhino
Hi,
In this pythonscript I'd like to remove possible overlapping points of two different list of points. It's a list of points subtraction.
Tried a lot, no success, should be simple?
Help appreciated!
Pim.
Tags:
Hi Pim
nice to hear again from you!
It turns out that this was actually not that simple, due to the small amounts of noise that build up when points are rotated. This is normal, and it's a common problem in computer graphics with floating point numbers. To tackle this, I choose to use a tree, to make the lookup fast. But probably even a normal linear search would do in this case. The reason is that this logic seems to become increasingly improbable after about 200 points (I think one could speculate some theories but I haven't looked too much into this).
One could probably use Galapagos, Hoopsnake or any other iterative method to actually find very long paths... here is one that I liked:
I hope this is useful,
Giulio
--
Giulio Piacentino
for Robert McNeel and Associates
giulio@mcneel.com
Hee Guilio, thanks for your magnificent solution.
I know, I should come to class, I will someday, too.
This script is supposed to create a layout for floating islands (max. 25 or so), I'm going to try to make it step back after some iterations to create branches.
Your idea of creating a tree sounds great, I'll get in to it.
But for my humble understanding: how would it look in a normal linear search? Is there no simple function to subtract one list from another?
Thanks, Pim.
Hi Pim
normal linear search would just be a 'for loop' checking if the distance is less than .. something.
>> Is there no simple function to subtract one list from another?
There could be a simple function to subtract one list from another (sets, etc), if points were exactly the same. But the issue here is that points are not exactly the same. So we need to ask: which points are closer than some distance, so they are practically the same, and which are just different?
One trick could be to just remove some noise in the lower digits of each point coordinate, but that has the disadvantage not to always work.
Giulio
--
Giulio Piacentino
for Robert McNeel and Associates
giulio@mcneel.com
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by