home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug099.arc / CIRCLE.I < prev    next >
Text File  |  1979-12-31  |  512b  |  20 lines

  1. Procedure Circle(XCentre,YCentre,XRadius,YRadius : Integer;
  2.                  F : Operation);
  3.  
  4. var
  5.   X, Y, A, B : Integer;
  6.   H : Byte;
  7.   Rotate : Real;
  8.  
  9. Begin
  10.   for H := 0 to 40 do
  11.     begin
  12.     Rotate := 0.15707962 * H;
  13.     X := XCentre + Round(XRadius*Cos(Rotate));
  14.     Y := YCentre + Round(YRadius*Sin(Rotate));
  15.     if H = 0 then begin A := X; B := Y; end;
  16.     Plot(A,B,X,Y,F);
  17.     A := X; B := Y;
  18.     end;
  19. End;
  20.