function v=table(x,y,a)
r_angle=pi*a/180;
x_step=sin(r_angle)*.001;
y_step=cos(r_angle)*.001;
while (~off(x,y))
  x=x_step+x;
  y=y_step+y;
end
v=[x y];

function d=off(x,y)
if(x<0 || x>4 || y>8 || y<0)
   d=1;
else
   d=0;
end
