Jump to content
otto

Attribcreate avoid same value neighbours

Recommended Posts

Hi!

How can I test and avoid that two neighbour points gets same exact attribute value when using random in attribcreate? Here illustrated with a simple setup with ordered grid points as input.

My attribute my_number is rand($PT)*5

loop.hip

odforce01.JPG

odforce023.JPG

Share this post


Link to post
Share on other sites

try to widen the range of values. now they only go from 0-5 make it big like 0-9999

or try not to use $PT instead use ($PT*4542248.26) [some big random number in there]

Share this post


Link to post
Share on other sites

Thanks for the quick reply 3dome. Unfortunately, I have a limited range of values to choose from in my setup (the screenshots were from an example file), so I can't use that approach.  

Share this post


Link to post
Share on other sites

Just another question, @Aizatulin. Is it possible to make this setup work on points that are not on a grid, but for instance a set of points that are created from a singe point copied 10x horizontally and 10x vertically (see example file)? I tried using nearpoints instead of neighbours, but I am not sure how to get the point position in this code. Sorry, I am an absolute beginner when it comes to VEX :blush:.

loopZ.hipnc

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

×