<< NL_V_PotentialRectangles NL_V: Vision NL_V_RectanglesCorners >>

NARVAL >> NL_V: Vision > NL_V_RectangleCorners

NL_V_RectangleCorners

Generate the coordinates of the corners of a rectangle (obstacle).

Calling Sequence

[Ox,Oy] = NL_V_RectangleCorners(X,Y,H,W,A)

Arguments

X :

X-coordinate of the main corner.

Y :

Y-coordinate of the main corner.

H :

Rectangle height.

W :

Rectangle width.

A :

Angle.

:

X-coordinate of all obstacle corners.

:

Y-coordinate of all obstacle corners.

Description

NL_V_RectangleCorners generates the coordinates of the corners of a rectangle (obstacle). The rectangle is defined by its main corner coordinates [X,Y], its height H, its width W and the angle between its largest side and the x-axis A. (respectivelly ) gathers the x-coordinate (respectivelly y-coordinate) of all obstacle corners.

Examples

x1=300;//coordinates of the first corner
y1=400;
h=200;//height
w=100;//width
a=%pi/4;//angle
[x,y]=NL_V_RectangleCorners(x1,y1,h,w,a)//application of NL_V_RectangleCorners

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