unit Main;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
const
 PI = 3.14159;
var
 X,Y: Real;
 PX,PY: Longint;
 HalfHeight: Longint;
begin
 HalfHeight := Form1.Height div 2;
 for PX := 0 to Form1.Width do
 begin
  X := PX * (2*PI/Form1.Width);
  Y := sin(X);
  PY := trunc(0.7 * Y * HalfHeight) + HalfHeight;
  Canvas.Pixels[PX,PY] := 0;
 end;
end;

end.