Uses Crt, Grapher; Const w = 30; e = 8; x = (320 div e)-1; y = (200 div e)-1; d = 255/6; Var a: Array [0..y,0..x] of Integer; i,j,k,l,m,c,z: Integer; r: Real; ch: Char; {****************************************************************************} Begin Init256Mode; for i:=0 to (200 div e)-1 do for j:=0 to (320 div e)-1 do a[i,j]:=Random(256); r:=0; z:=1; REPEAT case z of 1: for i:=0 to 255 do SetRGBPalette(i, 0, i div 10, i div 4); 2: for i:=0 to 255 do SetRGBPalette(i, Round(i*(0.75+abs(0.25*sin(r+PI/4)))) div 8, Round(i*(0.5+0.5*sin(r))) div 8, Round(i*(0.25+abs(0.75*sin(r+PI/4)))) div 8 ); 3: for i:=0 to 255 do if i < 128 then SetRGBPalette(i, i div 2, 0, 0) else SetRGBPalette(i, 63, (i-128) div 2, 0); 4: begin { SetRGBPalette(0,0,0,0);} for i:=0 to Round(2*d) do SetRGBPalette(i, 63, Round(63*i/2/d), 0); for i:=Round(2*d) to Round(3*d) do SetRGBPalette(i, 63-Round(63*(i-2*d)/d), 63, 0); for i:=Round(3*d) to Round(4*d) do SetRGBPalette(i, 0, 63, Round(63*(i-3*d)/d)); for i:=Round(4*d) to Round(5*d) do SetRGBPalette(i, 0, 63-Round(63*(i-4*d)/d), 63); for i:=Round(5*d) to Round(6*d) do SetRGBPalette(i, Round(63*(i-5*d)/d), 0, 63) end end; {case} for i:=0 to (200 div e)-1 do for j:=0 to (320 div e)-1 do PutPixel(j*e,i*e,a[i,j]); for j:=0 to 319 do if (j mod e) = 0 then for i:=0 to (200 div e)-1 do for k:=1 to e-1 do PutPixel(j,i*e+k,Round(GetPixel(j,i*e)+(k/(e-1))*(GetPixel(j,(i+1)*e)-GetPixel(j,i*e)))); for i:=0 to 199 do for j:=0 to (320 div e)-1 do for k:=1 to e-1 do PutPixel(j*e+k,i,Round(GetPixel(j*e,i)+(k/(e-1))*(GetPixel((j+1)*e,i)-GetPixel(j*e,i)))); showscreen; for i:=0 to (200 div e)-1 do for j:=0 to (320 div e)-1 do begin a[i,j]:=a[i,j]+w-Random(Round(2*w + (w div 3)*sin(3*r))); if a[i,j] < 1 then a[i,j]:=1; if a[i,j] > 255 then a[i,j]:=255 end; r:=r+0.05; if KeyPressed then begin ch:=ReadKey; if ch in ['1'..'4'] then z:=ord(ch)-48 end UNTIL ch = #27; Done256Mode End.