uses Crt, Graph;
var x1,x2,y1,y2: integer;
x0,y0: integer;
dx,dy: real;
x,y:real;
yx:integer;
i:real;
Dv,Mv:integer;
begin
dv:= detect;
initGraph(Dv,Mv,' ');
cleardevice;
x1:=10;
y1:=15;
x2:=-10;
y2:=-15;
dx:=(x1-x2)/640;
dy:=(y1-y2)/480;
SetFillStyle(1,1);
FloodFill(1,1,1);
x0:=round(-x2/dx);
y0:=round(-y2/dy);
line(x0,0,x0,480);
line(0,y0,640,y0);
i:=0;
repeat
x:=x2+i*dx;
y:=sin(x);
yx:=-round((y2+y)/dy);
PutPixel(round(i),yx,14);
i:=i+0.01;
until i>640;
readkey;
CloseGraph;
end.