I have a 7x6 grid of individual planes.
I need to place a material on only 8 of the planes randomly.
I have a working routine for going through the grid and randomly assigning the materials.
It is randomly choosing of the planes in the grid to use that is stumping me.
The assignment needs to be random but somewhat evenly distributed.
I have been thinking about the algorithm quite a bit but have yet to see through to the solution.
Any thoughts?
Right, so cycle through the list 8 times or as many times as it takes, each time selecting a plane based on a random selection of index numbers. Each selection is added to a "Selected" list and compared with the next pick. If I have already picked it in a previous loop then try again. I like it, simple and straight forward. For some reason I wanted it to be much more complex. It will be interesting to see what kind of a spread/distribution I get. I don't want the selected to be all bunched up. Thanks.
– diggerjohn