fubbu Posted January 29, 2018 Share Posted January 29, 2018 I want to get only one closes point to grid (that's mean I have 1000 points and I have a grid which has 100 points and only 100 closes points are in position of the grid, they can`t duplicate on position). Could someone help ?? test.hip Quote Link to comment Share on other sites More sharing options...
beliveau.maxime Posted January 29, 2018 Share Posted January 29, 2018 Hey Fubbu, Based on what I understand, your second input only provides 121 points, not 100 (you have 100 primitives, middle click on the node grid1). Hence, you're only providing 121 possible positions to your 1000 points. Can I ask what it is that you're trying to achieve? Thanks! Quote Link to comment Share on other sites More sharing options...
fubbu Posted January 29, 2018 Author Share Posted January 29, 2018 Here is the original hip. What I need is when I reach some point I want to set only the same amount of points into grid and rest points must be free. When you look at animation you see that in some moments all cubes are flattened to a grid. new_6.hip Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 29, 2018 Share Posted January 29, 2018 for a start, if you want ONE closest point why don't you use nearpoint() ? (no S at the end) But you used nearpoints(), fair enough coz you may want several of them maybe to go on to the next candidates in case of you get one you've already used....but if you use nearpoints(1,@P,5,1) with the last parameter as 1....you're getting just ONE...it defeats the purpose of getting several points... is your nearpoints(1,@P,5,1) supposed to be nearpoints(1,@P,1,5) ? ie...search radius 1, get me 5 points ? Quote Link to comment Share on other sites More sharing options...
fubbu Posted January 29, 2018 Author Share Posted January 29, 2018 (edited) Thx for help. I found solution for this problem Edited January 30, 2018 by fubbu 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.