Generate the coordinates of the corners of rectangles (obstacles) in respect with a set of defined angles.
[Xs,Ys,X,Y,H,W,A] = NL_V_RectanglesCornersA(N,L,Hm,HM,Wm,WM,Al)
Quantity of rectangles.
Square area side.
Minimum height.
Maximum height.
Minimum width.
Maximum width.
List of available angles.
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_RectanglesCornersA 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 the set of available angles stored in
). 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.