Jump to content

Finding point with most surrounding points VOPS


Recommended Posts

Hi there,

 

I have a point distribution, in VOPS I'm trying to get a single point that has the most amount of surrounding points in that distribution (within a given radius for each point)... I've done it once before but can't recall how... I think I was using a pciterate and a pcfind in a while loop, but it's totally slipped my mind. Help would be appreciated!

Edited by benderonline
Link to comment
Share on other sites

stick this in a wrangle:

 

float maxdist =ch('dist');
i@near = len(nearpoints(0,@P,maxdist));

the 'near' attribute tells you how many points are within the range of the 'dist' slider.

 

Then put down a sort sop, by attribute, 'near', reverse, the 0 point will be the one (or one of the ones) with the most neighbours.

 

 

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...