Jump to content
Sign in to follow this  
karen

randomise point sort in a for each loop

Recommended Posts

I have a for each loop that run over each one of these primitives, each has 4 points, (0,1,2,3).

I need to create chaos in the order of points so I use sort with random for points, the problem is I get the same change to all of them.

How to randomise that?

randomise sort in for each.JPG

Share this post


Link to post
Share on other sites

the sort has a seed, so simply use the iteration of your loop as the seed ?

Edited by Noobini

Share this post


Link to post
Share on other sites

here's an illustration, using the same grid throughout

the order of the points now are all screwed (ahem...random) so the nice grid is no longer nice...

 

 

SortSeed.jpg

vu_sortSeed.hiplc

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  

×