dfm} boolarr=array [1 .. 1000,1 .. 1000] of boolean; h=400; w=400; pi=3.1415926535897932384626433832; bmpin, bmpout: TBitmap; , WW: real; Ellipse (X, Y, A, B: integer; Angle: real);, S, C, H2, K1, K2, R: real;, X2, Y1, Y2, X3, Y3, X4, Y4, YY: integer;:=(180-Angle) * PI/180;:=Sin (I);:=Cos (I);:=Sqr (A * S) + Sqr (B * C); H2= 0 then:=0;:=0;:=S * C * (Sqr (A)-Sqr (B)) / H2;:=A * B/H2;;:=0; Sqr (YY) <= H2 do:=K2 * Sqrt (H2-Sqr (YY));:=Round (K1 * YY + R);:=Round (K1 * YY-R);. Canvas.Pen.Color:=clRed; YY= 0 then.Canvas.Pixels[X+X1,Y+YY]:=bmpout.Canvas.Pen.Color;.Canvas.Pixels[X-X1,Y-YY]:=bmpout.Canvas.Pen.Color;.Canvas.MoveTo(X+X1,Y+YY);.Canvas.LineTo(X+X3,Y+YY- 1);. Canvas.MoveTo (X + X2, Y + YY);. Canvas.LineTo (X + X4, Y + YY - 1);.Canvas.MoveTo(X-X1,Y-YY);.Canvas.LineTo(X-X3,Y-YY+1);.Canvas.MoveTo(X-X2,Y-YY);.Canvas.LineTo(X-X4,Y-YY+1);;:=X1;:=X2;(YY);;:=Int(1.99*(YY-Sqrt(H2)));.Canvas.MoveTo(X+X3,Y+YY- 1);. Canvas.LineTo (X + X3-Round (R), Y + YY-Round (H2));. Canvas.LineTo (X + X4, Y + YY - 1);.Canvas.MoveTo(X-X3,Y-YY+1);.Canvas.LineTo(X-X3+Round(R),Y-YY+Round(H2));.Canvas.LineTo(X-X4,Y-YY+1);;znah(bmpin,bmpout:Tbitmap;colshkr:boolarr);g:array [1 .. 1000,1 .. 1000] of boolean;,j,k,n,r,l,p,q,t,e,w,h,pn,x,y,a,b:integer;,sy,sw:longint;,gg,bb:byte;,u02,u20,teta,imin,imax:real;:TColor;,py:array [1 .. 30000] of integer; i:=1 to bmpin.Height doj:=1 to bmpin.Width do g [i, j]:=false; i:=1 to bmpin.Height doj:=1 to bmpin . Width do ((colshkr [i, j]) and (not (g [i, j]))) then:=1; [1]:=j; [1]:=i; [i, j]: =true;:=j; r:=j;:=r +1; ((colshkr [i, r]) and (not (g [i, r])) and (r <= bmpin.Width)) do :=pn +1; [pn]:=r; [pn]:=i; [i, r]:=true;:=r +1;;:=r - 1;:=i +1;:= 0; w:=0; p:=l to r do ((colshkr [t, p]) and (not (g [t, p]))) then:=pn +1; [pn]:=p; [pn]:=t; [t, p]:=true; ((colshkr [t, p]) and (e=0)) then e:=p; ((colshkr [t, p]) and (e < ;> 0)) then w:=p;;:=e; r:=w; l=r then break;:=l - 1; ((colshkr [t, p]) and (not (g [t , p])) and (p>=1)) do:=pn +1; [pn]:=p; [pn]:=t; [t, p]:=true;:=p - 1;; :=p +1;:=r +1; ((colshkr [t, p]) and (not (g [t, p])) and (p <= bmpin.Width)) do:=pn +1; [pn]:=p; [pn]:=t; [t, p]:=true;:=p +1;;:=p - 1;:=t +1; ((r=l) or ( t> bmpin.Height));:=0; sy:=0; sw:=0; k:=1 to pn do:=bmpin.Canvas.Pixels[px[k],py[k]];:=GetRValue(col);:=GetGValue(col);:=GetBValue(col);:=round(0.3*rr+0.59*gg+0.11*bb);:=sw+rr;:=sx+px[k]*rr;:=sy+py[k]*rr;;:=round(sx/sw);:=round(sy/sw);:=0; u20:=0; u02:=0; k:=1 to pn do:=bmpin.Canvas.Pixels[px[k],py[k]];:=GetRValue(col);:=GetGValue(col);:=GetBValue(col);:=round(0.3*rr+0.59*gg+0.11*bb);:=u1+(px[k]-x)*(py[k]-y)*rr;:=u02+sqr(px[k]-x)*rr;:=u20+sqr(py[k]-y)*rr;;u20=u02 then teta:=arctan (0) teta:=arctan (2 * u1 / (u20-u02)) / 2;:=0; imax:=0; k:=1 to pn do:=imax+sqrt(abs((px[k]-x)*sin(teta)-(py[k]-y)*cos(teta)));:=imin+sqrt(abs((px[k]-x)*cos(teta)-(py[k]-y)*sin(teta)));;imin=0 then u02:=0 else u02:=power (imax, 3) / imin; imax=0 then u20:=0 else u20:=power(imin,3)/imax;:=round(power((4/pi),1/4)*power(u02,1/8));:=round(power((4/pi),1/4)*power(u20,1/8));(a<4*b) and (a> 3 * b) then ellipse (x, y, a, b, teta);;; min (r: byte; g: byte; b: byte): byte;:=r; b result then result:=b; g> result then result: =g;; TForm1.Button1Click (Sender: TObject); openpicturedialog1.Execute then.Picture.LoadFromFile(openpicturedialog1.filename);:=TBitmap.Create;.assign(image1.Picture.Graphic);.AutoSize :=True;. AutoSize:=false;:=I...