home *** CD-ROM | disk | FTP | other *** search
- PROGRAM ConnectedWeb;
-
- VAR
- a0,r0,d,a9,a,r,x,y : real;
- i,j,k,l,n,p : integer;
- {$i diablo.lib }
-
- BEGIN
- writeln('This program, connected web, was developed and coded by');
- writeln('Joe Jacobson, and is based on a suggestion by Chris');
- writeln('Kuebler. Parameter N gives the # of vertices. P gives the');
- writeln('# of imaginary tic markes on each vertex axis. A0 is the');
- writeln('initial rotation angle. R0 is the overall radius. The');
- writeln('overlay enhances the picture. For example, try:');
- writeln('(N,P,A0,R0)=(16,20,0,50) and request an overlay when asked.');
- writeln('This gives a fairly neat pattern.');
- writeln;
- write('Enter N,P,A0,R0. ');
- readln(n,p,a0,r0);
- write('Enter 1 for single pattern, 2 for overlay.');
- readln(k);
- d := r0/p;
- a9 := 360/n;
- init_diablo;
- FOR l := 1 TO k DO
- BEGIN
- FOR i := 0 TO p-1 DO
- FOR j := 0 TO n DO
- BEGIN
- a := (a0+j*a9)*3.141592/180;
- r := ((p-i)*(j and 1)+(i+1)*((j+1) and 1))*(d);
- x := (250+r*cos(a));
- y := (250+r*sin(a));
- IF j=0 THEN
- plot(round(x),round(y))
- ELSE
- drawto(round(x),round(y))
- END;
- a0 := a0 + a9/2
- END;
- reset_diablo
- END.