Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Best 2d grouping algorithms to try for a 3+d thing?

JosiahMaybe

Platinum Coder
In summary, looking for most efficient parallel GPU 2d group to same or similar space for this application with cutting. Basically just 2d group to nearly entirely same spaces.

I start with points of all same number of dimensions, shapes made of indices of points to make a shape, and view point and view plane and space definitions. From there I would probably get 2d on view plane points and z with that, z happens by default per point. I would probably then get axis aligned bounding boxes and by that, from a start point around to an end point one way, which rotation, counterclockwise or clockwise, is in.

From there, I group in 2d view space, if things cross perimeters then cut so they do not, if in same 2d view space and planes intersect, cut so they do not, and draw order all close by in algorithm. I should mention that shapes are only straight line planar polygons, straight lines, or points. Groups may not need any specific relation to each other. Ask if you want any more information. This is for like my new fully real like 3+ dimensional algorithm. After this all, tesselate and draw respecting defined relations.

Some optimizations: near 100% accurate point in polygon algorithm found (my own), cut lines may be represented by start, end, and float, compare only one corresponding same 2d coordinate z values until a before or after is found, possibly like 3d cutting despite more dimensional, 2d cuts already have 2d points defined so just find z if anything, everything but cutting, grouping, and draw orders can be entirely independent and parallel, group axis aligned bounding boxes, can cut for efficiency or any purpose, and more dimensional to 2d relations.

All this would probably be implemented in Slang shader language for GPU and some CPU (all Slang). It has been suggested to me to use grid based stuff with include as many times as it is in each grid cell for simplicity and speed by Grok AI which said it was like O(n/p) time. I can probably almost ignore small numbers of shapes as those should not slow things much and as I could be dealing with anything from a 3d to a million dimensional+, I would prefer to keep usage of all coordinate parts to a minimum. Another note, if a point is not possible to view (it happens, clipping and not same like 3d slice), whole shape may be not drawn or grouped or ordered or cut.

Another note, this is crop type more dimensional, I know at least one other type of more dimensional. This is long I know, amazing person if you read all that. Any questions feel free to ask. Also, I am going for best speed at 100% accurate within computer limits. I control what cuts happen and a record of origin shapes to cut shapes should be. I know I could just try stuff but this could be a lot so algorithm first. X E.
 
Looks like this huge task could use some brainstorming. Just name some things that could work please? To start, K-cluster, DBSCAN, grid based. X E.
 

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom