Курсовая работа: Сечение многогранников
Form1.StatusBar2.Panels[2].Text:='Z= '+floattostrf(InterPoint[j].z,ffGeneral,3,5);
end;
Procedure SelectPointIntersection(i,x,y:integer;var Num:integer);
Function SelP(X,Y,Xt,Yt,ST:real):boolean;
var Obl:boolean;
begin
Obl:=false;
if (X<(Xt+ST)) and (X>(Xt-ST)) then
if (Y<(Yt+ST)) and (Y>(Yt-ST)) then
Obl:=true;
SelP:=Obl;
end;
var j:integer;
begin
Num:=0;
for j:=1 to 3 do
case i of
1: if SelP((X-Scene[i].M.Cx)/Scene[i].M.Mash,(Scene[i].M.Cy-Y)/Scene[i].M.Mash,InterPoint[j].x,InterPoint[j].y,SizeT/Scene[i].M.Mash) then Num:=j;
2: if SelP((X-Scene[i].M.Cx)/Scene[i].M.Mash,(Scene[i].M.Cy-Y)/Scene[i].M.Mash,InterPoint[j].x,InterPoint[j].z,SizeT/Scene[i].M.Mash) then Num:=j;
3: if SelP((X-Scene[i].M.Cx)/Scene[i].M.Mash,(Scene[i].M.Cy-Y)/Scene[i].M.Mash,InterPoint[j].y,InterPoint[j].z,SizeT/Scene[i].M.Mash) then Num:=j;
end;
end;
Function SelReber(win,x,y:integer;var ds:TPoint):boolean;
var rez:boolean;
Function LinEx(i:integer; x1,y1,x2,y2,x,y:real):boolean;
begin
LinEx:=abs(round(((x-x1)*(y2-y1)-((y-y1)*(x2-x1)))*Scene[i].M.Mash))<5
end;
Procedure FindRb(ind1,ind2:integer);