


HIT_SAMPLE_RECTANGLES Generate random points in a list of 2D rectangles intersected with a bounding polytope.
-------------------------------------------------------------------------
DESCRIPTION
-------------------------------------------------------------------------
X=hit_sample_rectangles(S, Bigregion)
Example: X=hit_sample_rectangles...
({{[1,2],[0,1],20},{[2,1],[-2,0],500}},Bigregion)
-------------------------------------------------------------------------
INPUT
-------------------------------------------------------------------------
S{i} is a cell {int1,int2,np}
int1: [a,b] interval on the first coordinate describing the i-th
rectangle.
int2: [a',b'] interval on the second coordinate describing the i-th
rectangle.
np: number of points to be extracted in the i-th rectangle (intersected
with Bigregion).
Bigregion: bounding polytope.
-------------------------------------------------------------------------
OUTPUT
-------------------------------------------------------------------------
X(i,:) i-th sampled point.
-------------------------------------------------------------------------
COMMENTS
-------------------------------------------------------------------------
This function does not work if the bounding polytope and *some* rectangle
have an empty intersection.