unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormPaint(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormPaint(Sender: TObject);
var
  r,g,b :Integer;
  x,y :Integer;
begin
for x:=0 to ClientWidth-1 do
for y:=0 to ClientHeight-1 do
    begin
    r:=255;
    g:=Round(127+127*Sin((x+y)/100));
    b:=Round(127+127*Cos((x-y)/100));
    Canvas.Pixels[x,y]:=TColor(RGB(r,g,b));
    end;
end;

end.
