Курсовая работа: Сечение многогранников
CopySer.Y:=round(Main.Cy-(T.y*Main.Mash)) end;
end;
Ser:=CopySer
end;
Function UnSer(win:byte; X,Y:integer;Tx,Ty,Tz:real; Main:TMainVar):Point;
var CopyUnSer:Point;
begin
case win of
1: begin CopyUnSer.x:=(X-Main.Cx)/Main.Mash;
CopyUnSer.y:=(Main.Cy-Y)/Main.Mash; CopyUnSer.z:=Tz end;
2: begin CopyUnSer.x:=(X-Main.Cx)/Main.Mash;
CopyUnSer.y:=Ty; CopyUnSer.z:=(Main.Cy-Y)/Main.Mash end;
3: begin CopyUnSer.x:=Tx; CopyUnSer.y:=(X-Main.Cx)/Main.Mash;
CopyUnSer.z:=(Main.Cy-Y)/Main.Mash end;
end;
UnSer:=CopyUnSer
end;
Procedure TForm1.DrawGrane;
Procedure GranBrush(Main:TMainVar; win:byte; i:integer; P:TPenStyle; var Can:TImage);
var j:integer;
w:array of TPoint;
begin
SetLength(w,E[i,0]);
for j:=1 to E[i,0] do
w[j-1]:=Ser(win,V[E[i,j]],Main);
if Scene[win].G[i].BrushGr and Scene[win].G[i].Paint then
begin
Can.Canvas.Pen.Style:=psSolid;
Can.Canvas.Pen.Color:=Scene[win].G[i].ColorGr;