Jump to content

lulu01

Recommended Posts

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

 

 

 

Screenshot_1.png

measure_distance_nearpoint.hip

Link to comment
Share on other sites

@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 ?

  • Like 2
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...