Generate the coordinates of corners of rectangles (obstacles).
[Xs,Ys,X,Y,H,W,A] = NL_V_RectanglesCorners(N,L,Hm,HM,Wm,WM)
Quantity of rectangles.
Square area side.
Minimum height.
Maximum height.
Minimum width.
Maximum width.
X-coordinate of all obstacles corners.
Y-coordinate of all obstacles corners.
X-coordinate of the main corner of each obstacle.
Y-coordinate of the main corner of each obstacle.
Height of each obstacle.
Width of each obstacle.
Angle of each obstacle.
NL_V_RectanglesCorners generates the coordinates of the corners of N rectangles (obstacles) inside a square of side L. Each rectangle is defined by its main corner coordinates [X,Y], its height H (randomly chosen between and
), its width W (randomly chosen between
and
) and the angle between its largest side and the x-axis A (randomly chosen between 0 and 2*π). These values for all obstacles are stored respectivelly in X, Y, H, W and A.
(respectivelly
) gathers the x-coordinate (respectivelly y-coordinate) of all obstacle corners.