Jump to content

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






Share this post

Link to post
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

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