<< NL_V_RectanglesCorners NL_V: Vision NL_V_RectanglesCornersI >>

NARVAL >> NL_V: Vision > NL_V_RectanglesCornersA

NL_V_RectanglesCornersA

Generate the coordinates of the corners of rectangles (obstacles) in respect with a set of defined angles.

Calling Sequence

[Xs,Ys,X,Y,H,W,A] = NL_V_RectanglesCornersA(N,L,Hm,HM,Wm,WM,Al)

Arguments

N :

Quantity of rectangles.

L :

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 :

X-coordinate of the main corner of each obstacle.

Y :

Y-coordinate of the main corner of each obstacle.

H :

Height of each obstacle.

W :

Width of each obstacle.

A :

Angle of each obstacle.

Description

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.

Examples

no=4;//quantity of obstacles (rectangle)
L=1000;//squared area side
hm=100;//minimal height
hM=250;//maximal height
wm=100;//minimal width
wM=250;//maximal width
Al=[0 %pi/2 %pi -%pi/2];//available angles for obstacles
[Xs,Ys,X,Y,H,W,A]=NL_V_RectanglesCornersA(no,L,hm,hM,wm,wM,Al)//application of NL_V_RectanglesCornersA

Dependency

NL_V_RectangleCorners

Report an issue
<< NL_V_RectanglesCorners NL_V: Vision NL_V_RectanglesCornersI >>