
 const
  l = 4;
  a = 11;

 var
  wx, wy, wa: real;
  i: INTEGER;

 procedure DrawLineAngle;
  var
   t: REAL;
 begin
  MoveTo(round(wx), round(wy));
  t := wa * PI / 180;
  wx := wx + l * cos(t);
  wy := wy + l * sin(t);
  wa := wa + (i * a);
  LineTo(round(wx), round(wy));
 end;

begin

 wx := 100;
 wy := 300;
 i := 0;

 ShowDrawing;
 repeat
  DrawLineAngle;
  i := i + 1;
 until i > 20000;

end.
</pre>

<h3>Button Events</h3>

<table border='1'>
  <tr>
    <td width="48">Object</td>
    <td width="116">P