algorithmic modeling for Rhino
Hello
I am using quad tree to group a collection of 3d points to a 2d grid of rectangles.
since the points are in 3d space, the output is projected points of the initial 3d points.
I would like to ask how could i match the data structure of the points per leaf to the initial 3d points collection. (perhaps having the indexes of the initial points as outputs in quad tree component)
What i am trying to is to compute the average distance of the initial points, per leaf plane.
thank you in advance for your time.
best
alex
Tags:
This can be solved with closest point, but I also want the components quad/oct tree return other information such as indexes and topology, why not?
Testing each leaf with every 3d point kind of makes the benefits of quad/oct go away.
maybe i have not understood your suggestion correctly.
thank you
You're right, but what else can you do? (I know you already know this solution). You can ask to David, to add that output, and I have responded to join to the proposal. Sorry for the misunderstanding.
I guess since they are projected both indices and distances could be there as outputs.
Daniel i missed a question mark. i did not say i knew it.:-). But working with large set of points all the available components are too expensive to use.
I am out of ideas.
thank you again for your input.
Another possibility would be to make a mesh with the rectangles of quadtree, and a line for each point intersecting the mesh. Thus, only iterates once for each point and should be faster. The face intersecting with each line is the index of the branch of the quadtree points.
Daniel that's it! I skipped quad tree because when meshing quad tree's curves some curves created two faces etc.
so i created mesh plane, check for all the points the intersections according to mesh face indices and that gives the paths for the tree of the points that are for each face.
for 1milion640k point it spends 1 minute for the intersection and 45 seconds for the mempber indexes. the other compoents needed are quick.
i quess i can live with that. but still having the indices in qt and oct would be best.
thank you all fro your input and help
best
alex
Hello Joseph,
thank you for your answer, this could work when using octree, finding the average per 3d leaf and then go to 2d with those averages. will test it and post results.
but still, are there any other ideas?
thank you again Joseph. it is correct. problem is that brep inclusion still checks every point for every brep making it impossible for very large point collections.
i turned my interest to octtree and quad tree for that reason. maybe i a missing something there.
thank you again.
best
alex
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