program parametr;
uses graph , crt;
const a1 = 200; b1 = 1; c1 = 50;
a2 = 200; b2 = 16; c2 = 50;
var graphdriver , GraphMode :integer;
i : integer;
t , x ,y , x1 ,y1 , step:real;
begin
GraphDriver := VGA;
GraphMode := VGAHI;
InitGraph(graphDriver,GraphMode,'x:\mypasc~1\IVSEM~1\');
setviewport(320,240,639,479,clipoff);
step := 0.0001;
t:= step;
moveto(round(a1 * sin((b1*t+c1))),round(a2 * cos((b2*t+c2))));
t := 0;
repeat
t := t + step;
x := a1 * sin((b1*t+c1));
y := a2 * cos((b2*t+c2));
delay(100);
lineto(round(x),round(y));
until (t >= 10) or keypressed;
readln;
closegraph;
end.
Графика с С++ |