MadMax50 Posted September 25, 2020 Share Posted September 25, 2020 (edited) Hi,I have a question in regards to the pcfind function. I notice that when I look up the @P attribute I get a random point order in my array vs when I look up the @Cd attribute. Why am I getting a random point order in my array when I use @P vs when I use @Cd. The expressions im using is this: i[]@test = pcfind(1,"P",@P,100,5); returns: [ 29, 15, 6, 20, 22 ] [ 19, 4, 12, 20, 8 ] [ 28, 2, 18, 11, 35 ] [ 28, 2, 14, 18, 22 ] ... ... i[]@test = pcfind(1,"P",@Cd,100,5); returns: [ 29, 15, 6, 20, 22 ] [ 29, 15, 6, 20, 22 ] [ 29, 15, 6, 20, 22 ] [ 29, 15, 6, 20, 22 ] ... ... As you can see, The @Cd lookup is returning all the same point order in the array , whereas the @P lookup is giving me a random point order. Why is this ? I will attach my file for anyone that wants to see. Thank you pcfind_attributes.hipnc Edited September 25, 2020 by MadMax50 Quote Link to comment Share on other sites More sharing options...
anim Posted September 25, 2020 Share Posted September 25, 2020 it's not random order, it's ordered by proximity you are looking up n-points in 2nd input whose "P" attrib value is within certain radius from certain value 1. from value of @P, which is different for each point, therefore you will get different points that are closest to that value @P ordered from closest 2. from value of @Cd, which is the same for each point (since nonexistent on first input it's the default value of) {1, 1, 1}, therefore for each point you will get the same array of points ordered by proximity to {1, 1, 1} 1 Quote Link to comment Share on other sites More sharing options...
MadMax50 Posted September 28, 2020 Author Share Posted September 28, 2020 @anim Thank you for the reply anim. Not sure I understand fully. How is the pcfind function searching for the closest point ? Isn't it based of distance? Why would it matter if the @Cd value is the same . Thank you 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.