Jump to content
fubbu

nearpoints problem

Recommended Posts

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

Share this post


Link to post
Share on other sites

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!

 

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

Thx for help. I found solution for this problem

Edited by fubbu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×