home *** CD-ROM | disk | FTP | other *** search
- {$U+,V-}
-
- program manset;
- var z,zi,tz,tzi,c,ci,size,acorn,bcorn,mside,nside,mgap,ngap:real;
- m,n:integer;
- count,clr:byte;
- Picname:String[8];
- ch:char;
- Buffer : Array[1..128,1..256] of Char;
- Bufffile: File;
- {$I \turbo\Graph.p }
-
-
- Procedure GetClr(Var Count,Clr:Byte);
- Begin
- Case Count of
- 100..200 : Clr:= 0;
- 1..99 : Clr:= Count mod 7+1;
- End;
- End;
-
- begin;
- Write('Picture Name ? ');
- Readln(Picname);
- If Length(Picname)>8 then halt;
- Assign(Bufffile,Picname+'.pic');
- Rewrite(Bufffile);
- Write(' Enter Real corner ? ');Readln(Acorn);
- Write(' Enter Imaginary corner ? ');Readln(bcorn);
- Write(' Enter Side length ? ');Readln(Mside);
- GraphColorMode;
- GotoXY(34,1);Write(Acorn:6:4);
- GotoXY(34,3);Write(Bcorn:6:4);
- GotoXY(34,5);Write(MSide:6:4);
- GotoXY(34,7);Write(PicName);
- nside:=mside*(16.8/14.6);
- mgap:=mside/200;
- ngap:=nside/256;
- for m:=0 to 199 do
- begin
- for n:= 0 to 255 do
- begin
- c:=n*ngap+acorn;
- ci:=m*mgap+bcorn;
- count:=0;
- z:=0;
- zi:=0;
- repeat
- tz:=z*z-zi*zi;
- tzi:=2*z*zi;
- tz:=tz+c;
- tzi:=tzi+ci;
- size:=sqr(tz*tz+tzi*tzi);
- count:=count+1;
- if count>100 then size:=2.1;
- z:=tz;
- zi:=tzi;
- until size>2.0;
- GetClr(count,clr);
- plot(n,m,clr);
- end;
- Gotoxy(36,24);Write(m);
- end;
- GetPic(Buffer,0,0,319,199);
- BlockWrite(BuffFile,Buffer,256);
- Close(BuffFile);
- read(kbd,Ch);
- TextMode;
- end.