There are two simple methods I use:
1) Use regular grid positions with random perturbation offsets.
You can guarantee non-overlap by simply making the offset range
less than the grid spacing. This works better for objects of
similar size.
2) Use a mask bitmap (stencil). This takes more memory and more coding,
but basically you record the placement of objects in the mask, and
then consult the mask when placing more objects. Fortunately, the
mask only needs to be 1-bit per pixel.
Ray
Post a reply to this message
|