Jump to content
Sign in to follow this  
benderonline

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

Share this post


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

 

 

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
Sign in to follow this  

×