sorting random (noisy) points that clearly make a shape
3731 4 1- aoakenfoArchiact
- Member
- 65 posts
- Joined: Feb. 2017
- Offline
I have a bunch of randomized points, and in this example they form a circular shape, although they could easily be a noisy line. Even though I can clearly see the shape in the noise, I haven't figured out how to order the points so I can add a line across them.
My attempt was to split the circle into 2 halves, and then sort along the z-axis. Although it mostly works, it can still run into problems as shown in the image.
My attempt was to split the circle into 2 halves, and then sort along the z-axis. Although it mostly works, it can still run into problems as shown in the image.
- aoakenfoArchiact
- Member
- 65 posts
- Joined: Feb. 2017
- Offline
- Konstantin Magnus
- Member
- 682 posts
- Joined: Sept. 2013
- Offline
Uvtexture node set to cylindrical Y and then sort node set to attribute $MAPU .
A point VOP containing frompolar node.
An attribwrangle converting cartesian to polar coordinates using sin() and cos() .
A point VOP containing frompolar node.
An attribwrangle converting cartesian to polar coordinates using sin() and cos() .
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- jsmack
- Member
- 8041 posts
- Joined: Sept. 2011
- Offline
- Aizatulin
- Member
- 495 posts
- Joined: July 2005
- Offline
Hi,
If you have knowledge of the spline, which the points are following you can create an attribute (with xyzdist()) to get the u-value for each point to sort them with it . This works quite ok even for roughly approached splines. But if you have no information to create one, I think some heuristic solutions for the “travelling salesman problem” should work aswell but I don't have much experience in this area.
If you have knowledge of the spline, which the points are following you can create an attribute (with xyzdist()) to get the u-value for each point to sort them with it . This works quite ok even for roughly approached splines. But if you have no information to create one, I think some heuristic solutions for the “travelling salesman problem” should work aswell but I don't have much experience in this area.
-
- Quick Links