Реферат: Вращение треугольника
Angle := 0.1;
Draw(White);
Delay(Time2W);
Draw(Black);
for A := 1 to 3 do
begin
Xn := Round(ctr[1][a] * cos(Angle) + K * ctr[2][a] * sin(Angle));
Yn := Round(-K * ctr[1][a] * sin(Angle) + ctr[2][a] * cos(Angle));
Ctr[1][a] := Xn; Ctr[2][a] := Yn;
end;
Draw(White);
DrawText(105,60,Str2(x_c+ctr[1][1]));
DrawText(105,75,Str2(x_c+ctr[2][1]));
DrawText(105,90,Str2(x_c+ctr[1][2]));
DrawText(155,60,Str2(x_c+ctr[2][2]));
DrawText(155,75,Str2(x_c+ctr[1][3]));
DrawText(155,90,Str2(x_c+ctr[2][3]));
end;
begin
RegisterBgiDriver(@vgaDrv);
K:=-1;
Time2W := 15;
SetCenter(320,240);
Angle := 0.1;
grDriver := Detect;
grMode:=VGAHi; {video mode VGA 640x480x16colors}
InitGraph(grDriver, grMode,'');
ErrCode := GraphResult;
if ErrCode = grOk then