Program Space3D; uses graph, crt, dos, mouse, d3, grph3d, fig3d, Drowing; const nl = 17; var i,j,k : integer; TV : Vector; TP : Point; TW : Word; TmpFigP: TFig; lng : integer; f : text; Procedure DoEnd(n:word); begin closegraph; fig.WriteFile('Fig.tmp'); fig.done; DoneMouse; halt(n); end; procedure out; begin writeln(f,o[1],' ',o[2],' ',o[3],' ',g(a):5:2,' ',g(b):5:2);end; Procedure Drow; begin Sfer(zero,1000); with fig do begin Drow(fc^); with Figs[Index[0]^.n]^ do begin { MoveRel((o[1]-xyz[1])div speed,((o[2]-xyz[2])div speed),((o[3]-xyz[3])div speed));} outtextxy((mx-length(name))div 2,2,Name); end; end; ShowInfo; end; {$I-} Begin textmode(259); randomize; clrscr; a := 0; b := 0; speed := 400; miu := (1-1/10); grvt[2]:=-speed div 1; lng := 3000; if paramstr(1)<>'' then Fig.ReadFile(paramstr(1)) else Fig.ReadFile('All.3df'); { Drowings ------------------------------------------} DCirc3d(@Fig, zero, lng*3, 33, 1); DCirc3d(@Fig, zero, lng*3, 33, 2); DCirc3d(@Fig, zero, lng*3, 33, 3); with Fig do begin { for i:=0 to 20 do begin TmpFigP:= figs[AddFig(nil)]; new(TmpFigP^.Clr); TmpFigP^.Clr^:=random($FFFFFF-1000)+1000; // TP[1]:=random(lng*500); TP[2]:=-lng; TP[3]:=random(lng*500); TW :=random(lng*5)+100; TP:=zero; TP[1]:=i*lng*10; TW:=20000; DCirc3d(TmpFigP, TP, TW, i+3, 2); end; } end; {------------------------------------------ / Drowings} Fig.Init; {Greed - e} // readkey; init(vm); assign(f,'Move.poz'); if exist('Move.poz')then begin reset(f); while not eof(f) do begin readln(f,o[1],o[2],o[3],a,b); a:=r(a);b:=r(b); CalcVec; Drow; ChgPg; if keypressed and (readkey=#27) then Break; end; close(f); end; rewrite(f); SetMousePos(round(g(a)*rx), round((g(b)+90)*ry)); repeat GetUngls; CalcVec; // Fig.CalcDynam; CalcDynam; Drow; ChgPg; out; if leftbuttonpressed then move(1, speed); if rightbuttonpressed then move(1,-speed); if keypressed then case ReadKey of #27: DoEnd(0); #72: move(2,2*speed); #80: move(2,-2*speed); #77: move(3,2*speed); #75: move(3,-2*speed); #32: mv[2]:=mv[2]+lng div 5; #13: mv[2]:=mv[2]-lng div 5; 'm': begin inc(vm); init(vm); end; 'M': begin dec(vm); init(vm); end; 'S': Fig.WriteFile(''); end; until MiddleButtonPressed; DoEnd(0); End.