Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //link https://yadi.sk/d/mW96jkaciYHsRg
- uses graphABC;
- var x,y,r,h,i:integer;
- procedure zl(x11,y11:word);
- var z:integer;
- begin
- if (getpixel(x11,y11) <> rgb(0,0,0)) then
- begin
- setpixel(x11,y11,clred);
- if (getpixel(x11,y11+1)<> rgb(0,0,0)) or (getpixel(x11,y11-1)<> rgb(0,100,100)) then
- zl(x11,y11+1)
- else
- if (getpixel(x11-1,y11)<> rgb(0,0,0)) or (getpixel(x11,y11-1)<> rgb(0,100,100)) then
- zl(x11-1,y11)
- else
- if (getpixel(x11,y11+1)<>rgb(0,0,0)) or (getpixel(x11,y11-1)<> rgb(0,100,100)) then
- zl(x11,y11-1)
- else
- if (getpixel(x11+1,y11)<>rgb(0,0,0)) or (getpixel(x11,y11-1)<> rgb(0,100,100)) then
- zl(x11+1,y11);
- end;
- end;
- begin
- r:=4; // размер и количе
- //cередина
- x:=325;
- y:=240;
- h:=0;//ifu
- repeat
- h:=h+1;
- for i:=1 to 2*h-1 do //вправо
- begin
- x:=x+2*r;
- line(x-2*r,y+r,x,y+r);;
- sleep(0);
- end;
- for i:=1 to 2*h-1 do //вниз
- begin
- y:=y+2*r;
- line(x,y-r,x,y+r);
- sleep(0);
- end;
- h:=h+1;
- for i:=1 to 2*h-1 do//влево
- begin
- x:=x-2*r;
- line(x,y+r,x+2*r,y+r);
- sleep(0);
- end;
- for i:=1 to 2*h-1 do//вверх
- begin
- y:=y-2*r;
- line(x,y+r,x,y+3*r);
- sleep(0);
- end;
- until y<=2*r;
- readln();
- zl(325+11,240+16);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement