Coz_y_not Posted 18 hours ago Share Posted 18 hours ago I've got these points that don't seem to want to listen: I wanted to sort them in the x axis, so the 0 is to the left and the highest point number is on the right of the x axis, and the same applies to the first half of points and 2nd half of points. I have placed some colored spheres to visualise and realised my lovely points don't seem care about the sort node (Sort, point By X, couldn't be clearler), or am I doing something wrong that confused them? I would have expected the left side is all red and the right side is all green. sortingbyX.hiplc Quote Link to comment Share on other sites More sharing options...
Alain2131 Posted 17 hours ago Share Posted 17 hours ago (edited) Hi ! You can use the .12 icon to the right of the viewport to see your point numbers. As you can see, your points are properly increasing. In other words - your sort node works as you intend. You can bypass your sort node to see what the point numbers would be otherwise. The issue is with the logic in your split2 node. 0-`npoints(opinputpath(".",0))`:2 You're saying to keep all points from 0 to 999, but take one point out of two. This does give half the amount of points, but it takes 0, 2, 4, 6, 8, ..., 990, 992, 994, 996, 998 If you look at where 990, 992... are in the above screenshot, they're on "the wrong side". Instead, you want to take the points from 0 to 499, like so 0-`npoints(opinputpath(".",0))*0.5` You can simplify this like so 0-`npoints(0)*0.5` Then coloring your points will give the expected result. sortingbyX_fixed.hiplc Edited 16 hours ago by Alain2131 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.