function [xbox,ybox]=rosebox(r,d,l,w)
%	makes x and y coordinates for a box that is:
%		   radius  r  away from the origin in
%		direction  d  (degrees clockwise from north or +y),
%		   length  l  extending away from origin, and
%		    width  w.
%
%	Take a unit square on x axis and scale it:
xus=[0 0 1 1 0 0];
yus=[0 -.5 -.5 .5 .5 0];
x=xus*l;
y=yus*w;
%
%	Convert degrees clockwise from north to
%		radians counterclockwise from +x axis:
a=(90-d)*pi/180;
%
%	Rotate box about origin:
rot=[cos(a) sin(a); -sin(a) cos(a)];
z=[x;y];
zr=z'*rot;
%
%	Translate box out from origin:
xbox=zr(:,1)+r*cos(a);
ybox=zr(:,2)+r*sin(a);
