lulu01 Posted July 26, 2018 Share Posted July 26, 2018 So for the last view weeks I've been learning vex, great stuff. So now I want to turn my new awesome vex knowledge into practise. The goal of this operation is the measure the distance between each point to their closest neighbour. First, I use the pcfind function to grab the nearest point of each point number and put them in an array. Second, now I like to grab the values from the array and put them into a distance function. (BUT HOW?) I find array a bit of a vague concept. I get its a list of values, but I'm not really sure if the point numbers in the array also hold the position vector. Not sure if I'm doing this right, and probably there better way. If this method is right, pretty please help me out. kind regards, The new kid on the block measure_distance_nearpoint.hip Quote Link to comment Share on other sites More sharing options...
Noobini Posted July 26, 2018 Share Posted July 26, 2018 @distance = distance(@P, point(0, "P", @nearpt[1])); this finds dist between current point being processed, @P, and its nearest neighbour....@nearpt[0] would be ITSELF...so we skip to @nearpt[1] However, I'm puzzled why your statement v@nearpt = pcfind(0, "P", @ptnum, 10.0, 2); works tho ?...to me it should be v@nearpt = pcfind(0, "P", @P, 10.0, 2); can someone explain ? 2 Quote Link to comment Share on other sites More sharing options...
lulu01 Posted July 29, 2018 Author Share Posted July 29, 2018 Noobini, thank you for your help 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.