Program DetkaKonfetka;
uses Drawman;
begin
Field(14,8);
ToPoint (1,1);
PenDown;
OnVector(1,4);
OnVector(4,4);
OnVector(4,1);
OnVector(1,1);
PenUp;
ToPoint (3,3);
OnVector(3,6);
OnVector(6,6);
OnVector(6,3);
OnVector(3,3);
ToPoint (5,5);
OnVector(5,8);
OnVector(8,8);
OnVector(8,5);
OnVector(5,5);
ToPoint (7,6);
OnVector(6,10);
OnVector(10,3);
OnVector(7,3);
OnVector(7,6);
ToPoint (9,4);
OnVector(12,4);
OnVector(12,1);
OnVector(9,1);
OnVector(9,4);
ToPoint(0,0);
End.
Program parabola;
Uses crt,GraphABC;
Const
w=800;
h=600;
x0=400;
y0=300;
k=20;
var i,x1,y1:integer;
x,y:real;
begin SetWindowSIze(w,h);
Line(0,y0,w,y0);
Line(x0,0,x0,h);
TextOut(x0+5,y0+5, '0');
TextOut(w-10,y0+5, 'x');
TextOut(x0+5,10,'y');
i:=k;
while i<w do
Line (i,y0-5,i,y0+5);
i:=i+k;
end;
While i<h do
begin Line(x0-5,i,x0+5,i);
x:=-20;
while x<=20 do
y:=x*sin(x);
x1:=Round(x0+k*x);
y1:=Round(y0-k*y);
SetPixel(x0,y1,clblue);
SetPixel(x1,y0,clblue);
SetPixel(x1,y1,clred);
x:=x+0.01;
SaveWindow('Grafic.bmp');
end.
Program DetkaKonfetka;
uses Drawman;
begin
Field(14,8);
ToPoint (1,1);
PenDown;
OnVector(1,4);
OnVector(4,4);
OnVector(4,1);
OnVector(1,1);
PenUp;
ToPoint (3,3);
PenDown;
OnVector(3,6);
OnVector(6,6);
OnVector(6,3);
OnVector(3,3);
PenUp;
ToPoint (5,5);
PenDown;
OnVector(5,8);
OnVector(8,8);
OnVector(8,5);
OnVector(5,5);
PenUp;
ToPoint (7,6);
PenDown;
OnVector(6,10);
OnVector(10,3);
OnVector(7,3);
OnVector(7,6);
PenUp;
ToPoint (9,4);
PenDown;
OnVector(12,4);
OnVector(12,1);
OnVector(9,1);
OnVector(9,4);
PenDown;
ToPoint(0,0);
End.
Program parabola;
Uses crt,GraphABC;
Const
w=800;
h=600;
x0=400;
y0=300;
k=20;
var i,x1,y1:integer;
x,y:real;
begin SetWindowSIze(w,h);
Line(0,y0,w,y0);
Line(x0,0,x0,h);
TextOut(x0+5,y0+5, '0');
TextOut(w-10,y0+5, 'x');
TextOut(x0+5,10,'y');
i:=k;
while i<w do
begin
Line (i,y0-5,i,y0+5);
i:=i+k;
end;
i:=k;
While i<h do
begin Line(x0-5,i,x0+5,i);
i:=i+k;
end;
x:=-20;
while x<=20 do
begin
y:=x*sin(x);
x1:=Round(x0+k*x);
y1:=Round(y0-k*y);
SetPixel(x0,y1,clblue);
SetPixel(x1,y0,clblue);
SetPixel(x1,y1,clred);
x:=x+0.01;
end;
SaveWindow('Grafic.bmp');
end.