Выбор материала и расчет параметров обделок вертикальных стволов метрополитенов
Страница 23

(i-1)/(i*i*(i+1)*(3-4*PuassonP)));

if Pkr < PkrOld then PkrOld := Pkr else i:=0;

until i = 0;

P0 := StrToFloat(Edit1.Text);

if P0<=Pkr then

MessageDlg('Устойчивость обеспечена',mtInformation,[mbOk],0)

else

MessageDlg('Устойчивость не

обеспечена',mtInformation,[mbOk],0);

end;

end;

procedure TForm1.RadioButton1Click(Sender: TObject);

begin

Label2.Visible := False;

Label3.Visible := False;

Edit1.Visible := False;

Edit2.Visible := False;

end;

procedure TForm1.RadioButton2Click(Sender: TObject);

begin

Label2.Visible := True;

Label3.Visible := True;

Edit1.Visible := True;

Edit2.Visible := True;

end;

procedure TForm1.RadioButton3Click(Sender: TObject);

begin

Label2.Visible := True;

Label3.Visible := False;

Edit1.Visible := True;

Edit2.Visible := False;

end;

end.

unit Draw;

interface

uses

SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics,

Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls;

type

TDrawForm = class(TForm)

BitBtn1: TBitBtn;

procedure FormActivate(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

TPaintData = (isP0,isP2);

TDiagramArray = Array[TPaintData,1 5] of Double;

var

PLines : TDiagramArray;

DrawForm: TDrawForm;

implementation

{$R *.DFM}

procedure TDrawForm.FormActivate(Sender: TObject);

var

R: TRect;

MaxX, MinX: Double;

MaxY, MinY: Double;

Nx, Ny: Integer;

Kx, Ky: Double;

i: Byte;

PointMin, PointMax: Double;

procedure DrawLine(X0, k, b:Double);

begin

Canvas.MoveTo(R.Left+60+Round(Kx*X0),R.Bottom-30);

if k<0 then

Canvas.LineTo(R.Left+60,Round(R.Bottom - 33 -

(Ky*(b+(k*(10)/Kx)))))

else

Canvas.LineTo(R.Right-10,Round(R.Bottom - 33 -

(Ky*(-b+(k*((R.Right-R.Left-70)/Kx))))));

end;

begin

PLines[isP0,3] := 0;

PLines[isP2,3] := 0;

MaxX := 0.0;

MinX := 0.0;

MaxY := 0.0;

MinY := 0.0;

for i := 1 to 5 do begin

if PLines[isP0,i] > MaxX then MaxX := PLines[isP0,i];

if PLines[isP2,i] > MaxY then MaxY := PLines[isP2,i];

if PLines[isP0,i] < MinX then MinX := PLines[isP0,i];

if PLines[isP2,i] < MinY then MinY := PLines[isP2,i];

end;

if MaxX > 200 then Nx := 100 else Nx := 10;

MaxX := Round(MaxX/Nx)*Nx+Nx;

if MaxY > 200 then Ny := 100 else Ny := 10;

MaxY := Round(MaxY/Ny)*Ny+Ny;

with DrawForm do begin

Canvas.Pen.Color := clBlack;

R.Left := 10;

R.Top := 10;

R.Right := Width - 15;

R.Bottom := Height - 70;

Canvas.FrameRect(R);

Canvas.Brush.Color := clBtnFace;

Страницы: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31