Program Spokes;

{  A simple graphics demonstration using the hires screen.  This program  }
{  uses the external function LINE.INV which must reside on the default   }
{  drive in order to compile the program.   Jeff Firestone  June, 1984.   }

Var
  v, h, s, c, angle, radians : real;
  n, x, y, sx, sy, cx, cy : integer;


Procedure Line(a,b,c,d,e:integer); External 'Line.INV';


begin
  Write('Number of spokes on wheel : ');
  read(n); writeln;
  write('Size (245) : ');
  read(h); writeln;
  v:= h * 0.4;
  s:= 280;
  c:= 100;
  angle:= 360 / n;
  radians:= angle / 57.29578;
  hires; hiresColor(7);
  for x:= 1 to n do
  for y:= x to n do
  begin
    sx:= round(sin(x * radians) * h + s);
    sy:= round(sin(y * radians) * h + s);
    cx:= round(cos(x * radians) * v + c);
    cy:= round(cos(y * radians) * v + c);
    line(sy, cy, sx, cx, 1);
  end;
  readln;
end.
har(hh, sizeof(hh), 0);
  X1:= 0; Y1:= 0; OldX:= 0; OldY:= 0;
  BS:= 0.01; k:=0; g:=0; r:=0; a:=0;
  B1:= 1 - 