Home > hit > auxiliary > hit_sample_rectangles.m

hit_sample_rectangles

PURPOSE ^

HIT_SAMPLE_RECTANGLES Generate random points in a list of 2D rectangles intersected with a bounding polytope.

SYNOPSIS ^

function X=hit_sample_rectangles(S, Bigregion)

DESCRIPTION ^

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.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 01-Dec-2005 10:54:38 by m2html © 2003