DRAWCENTEREDEDGE Draw an edge centered on a point.
Draws a centered edge, defined by a center, a length and an orientation
(in degrees). This function can be used to draw principal axes of an
ellipse or of an oriented box.
drawCenteredEdge(EDGE)
Draws an edge centered on a point. EDGE has format [XC YC L THETA],
with (Xc, YC) being edge center, L being the edge length, and THETA
beigng the edge orientation, in degrees (counted Counter-clockwise from
horizontal).
Input argument can also be a N-by-4 array, in that can several edges
are drawn.
drawCenteredEdge(CENTER, L, THETA)
Specifies argument in seperate inputs.
drawCenteredEdge(..., NAME, VALUE)
Also specifies drawing options by using one or several parameter name -
value pairs (see doc of plot function for details).
drawCenteredEdge(AX, ...)
Specifies the axis to draw the edge on.
H = drawCenteredEdge(...)
Returns handle(s) to the created edges(s).
Example
% Draw an ellipse with its two axes
figure(1); clf;
center = [50 40];
r1 = 30; r2 = 10;
theta = 20;
elli = [center r1 r2 theta];
drawEllipse(elli, 'linewidth', 2);
axis([0 100 0 100]); axis equal;
hold on;
edges = [center 2*r1 theta ; center 2*r2 theta+90];
drawCenteredEdge(edges, 'linewidth', 2, 'color', 'g');
See also:
edges2d, drawOrientedBox, drawEllipse, centeredEdgeToEdge, drawEdge
---------
author : David Legland
INRA - TPV URPOI - BIA IMASTE
created the 05/08/2005.
Package: matgeom