HOME ПРИМЕРЫ THANKS НОВИЧКАМ ДОКИ LINKS JavaScript Mail | |||
| |||
|
Uses Graph,Crt; Var Driver,Mode,ErrCode,i:integer; x,sx,sx1,amp,y:real; procedure DrawCircle(x,y:integer;color:word); var p:FillPatternType; begin Setcolor(color); Circle(x,y,20); GetFillPattern(p); SetFillPattern(p,color); FloodFill(x,y,color); end; Begin Driver:= detect; Initgraph(Driver,Mode,''); ErrCode := GraphResult; if ErrCode <> grOk then WriteLn('Graphics error:',GraphErrorMsg(ErrCode)); sx1:=-1; amp:=1; OutTextXY(100, 1, 'Press any key to start...'); if (readkey=#27) then; for i:=1 to 640 do begin x:=1.5+i*0.02; sx:=sin(x); if (sx*sx1>0) then begin sx1:=-sx; amp:=amp/2; end; y:=amp*abs(sx); DrawCircle(i,460-round(480*y),blue); Delay(1050); DrawCircle(i,460-round(480*y),black); end; SetColor(White); OutTextXY(100, 40, 'Press enter to exit...'); readln; Closegraph; End.             |
HOME |