We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello everyone, I would like to experiment with an Octree. I found a demo in the Toxiclibs library, but I would like to know if there are others possibility, for example by He-Mesh that is more recent library or by coding directly in Processing or using PShape() function, please.
Any idea??
Thanks, Daimon
Answers
This was a fun write. Bam! Octree!
Thank you TFGuy!! It look so nice!
Can you explain me it a little, please? For example how works the rules of the boolean rules of bx, by and bz?
That would be telling.
Basically, an Octree is either: 1) A cube of a given size at a given position -- OR -- 2) A collection of 8 smaller Octrees, whose size is half their parent and whose position depends on which numbered child they are.
Child #0 for any Octree is in the same position. Child #7 is offset by some lengths in the X, Y, and Z directions. The bx, by, and bz look-up arrays are a quick and dirty way to determine which children should be shifted.
ok, thank you! This code is a bomb!
Why is a dirty way? how should be more clean?
I would like create moving points in the octree that make change the octree structure by passing. and create some geometric shapes between the distance of these points.
if i want create as a base an octree composed by
I tried PointOctee of Toxilibs but I think ituse the first method of given position and given size. I tried create an array of differents octrees in the different positions, but it look heavy a little.
Any help please?
I need an Octree that is divided from the start in 3 cubes on the X axis, 2 cubes on the Y axis and 3 cubes on the 2 axis. I would like that this Octree structure is on the start, after add points inside. For do it I did a For cicle that create different Octrees in any axis, because i don t know how to divide the first cube from the start, but it look little be heavy. It would be nice create this structure in the start in a signle Octree. Is it possible?