VERSION 5.00 Begin VB.Form Pogr_compare Caption = "Сравнение погрешностей" ClientHeight = 9300 ClientLeft = 60 ClientTop = 375 ClientWidth = 10005 LinkTopic = "Form1" ScaleHeight = 9300 ScaleWidth = 10005 StartUpPosition = 3 'Windows Default Begin VB.CommandButton Command1 Caption = "Построить" Height = 495 Left = 6480 TabIndex = 16 Top = 8640 Width = 1335 End Begin VB.CommandButton toMain Caption = "На главную" Height = 495 Left = 8040 TabIndex = 13 Top = 8640 Width = 1335 End Begin VB.Frame Frame1 Caption = "Сравнение погрешностей" Height = 8175 Left = 120 TabIndex = 0 Top = 240 Width = 9495 Begin VB.PictureBox Picture1 BackColor = &H80000009& Height = 5415 Left = 600 ScaleHeight = 5355 ScaleWidth = 8715 TabIndex = 6 Top = 1680 Width = 8775 End Begin VB.TextBox Text1 Height = 375 Left = 1920 TabIndex = 3 Text = "1" Top = 960 Width = 615 End Begin VB.TextBox Text2 Height = 375 Left = 4800 TabIndex = 2 Text = "6" Top = 960 Width = 615 End Begin VB.Label Label8 Caption = "n*10" Height = 255 Index = 1 Left = 9000 TabIndex = 27 Top = 7560 Width = 375 End Begin VB.Label Label9 Alignment = 2 'Center Caption = "2" Height = 255 Index = 2 Left = 1560 TabIndex = 26 Top = 7320 Width = 255 End Begin VB.Label Label9 Alignment = 2 'Center Caption = "4" Height = 255 Index = 3 Left = 2400 TabIndex = 25 Top = 7320 Width = 255 End Begin VB.Label Label9 Alignment = 2 'Center Caption = "6" Height = 255 Index = 6 Left = 3240 TabIndex = 24 Top = 7320 Width = 255 End Begin VB.Label Label9 Alignment = 2 'Center Caption = "8" Height = 255 Index = 8 Left = 3960 TabIndex = 23 Top = 7320 Width = 255 End Begin VB.Label Label9 Alignment = 2 'Center Caption = "10" Height = 255 Index = 10 Left = 4680 TabIndex = 22 Top = 7320 Width = 375 End Begin VB.Label Label9 Alignment = 2 'Center Caption = "12" Height = 255 Index = 12 Left = 5520 TabIndex = 21 Top = 7320 Width = 375 End Begin VB.Label Label9 Alignment = 2 'Center Caption = "14" Height = 255 Index = 14 Left = 6240 TabIndex = 20 Top = 7320 Width = 375 End Begin VB.Label Label9 Alignment = 2 'Center Caption = "16" Height = 255 Index = 16 Left = 7200 TabIndex = 19 Top = 7320 Width = 375 End Begin VB.Label Label9 Caption = "18" Height = 255 Index = 18 Left = 8160 TabIndex = 18 Top = 7320 Width = 255 End Begin VB.Label Label9 Caption = "20" Height = 255 Index = 20 Left = 9000 TabIndex = 17 Top = 7320 Width = 255 End Begin VB.Line Line6 BorderColor = &H000000FF& BorderWidth = 5 X1 = 7080 X2 = 8400 Y1 = 7680 Y2 = 7680 End Begin VB.Label Label13 Caption = "Метод трапеций" Height = 255 Left = 7080 TabIndex = 15 Top = 7800 Width = 1455 End Begin VB.Label Label12 Caption = "Метод Симпсона" Height = 255 Left = 2400 TabIndex = 14 Top = 7800 Width = 1455 End Begin VB.Line Line4 BorderColor = &H00000000& BorderWidth = 5 X1 = 2400 X2 = 3720 Y1 = 7680 Y2 = 7680 End Begin VB.Label Label11 Caption = "0.0114" Height = 255 Left = 0 TabIndex = 12 Top = 4440 Width = 495 End Begin VB.Label Label10 Caption = "0.0135" Height = 255 Left = 0 TabIndex = 11 Top = 4080 Width = 495 End Begin VB.Label Label9 Caption = "0.0255" Height = 255 Index = 0 Left = 0 TabIndex = 10 Top = 1800 Width = 495 End Begin VB.Label Label8 Caption = "0" Height = 255 Index = 0 Left = 240 TabIndex = 9 Top = 6960 Width = 135 End Begin VB.Label Label6 Caption = "1" Height = 255 Left = 720 TabIndex = 8 Top = 7320 Width = 375 End Begin VB.Line Line3 X1 = 480 X2 = 480 Y1 = 7200 Y2 = 1680 End Begin VB.Line Line2 X1 = 480 X2 = 9360 Y1 = 7200 Y2 = 7200 End Begin VB.Label Label3 Caption = "I" Height = 255 Left = 120 TabIndex = 7 Top = 1560 Width = 135 End Begin VB.Line Line1 BorderWidth = 2 X1 = 0 X2 = 9480 Y1 = 1560 Y2 = 1560 End Begin VB.Label Label4 Caption = "Введите значение a:" Height = 255 Left = 240 TabIndex = 5 Top = 1080 Width = 1695 End Begin VB.Label Label5 Caption = "Введите значение b:" Height = 255 Left = 3120 TabIndex = 4 Top = 1080 Width = 1695 End Begin VB.Label Label1 Caption = "Для наглядной иллюстрациий погрешностей 2-х методов изобразим их функции на одном графике I=f(n):" Height = 375 Left = 240 TabIndex = 1 Top = 360 Width = 8175 End End End Attribute VB_Name = "Pogr_compare" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Command1_Click() Picture1.Cls Picture1.Scale (10, -0.0255)-(200, 0) a = Text1 B = Text2 ' metod trapecii For i = 10 To 200 Step 10 X1 = i Y1 = -(((B - a) ^ 3) * 0.244) / (12 * X1 * X1) X2 = X1 + 10 Y2 = -(((B - a) ^ 3) * 0.244) / (12 * X2 * X2) Picture1.Line (X1, Y1)-(X2, Y2), RGB(255, 0, 0) Next i ' Метод Симпсона For i = 10 To 200 Step 10 X1 = i Y1 = -(((B - a) ^ 5) * 105) / (180 * ((2 * X1) ^ 4)) X2 = X1 + 10 Y2 = -(((B - a) ^ 5) * 105) / (180 * ((2 * X2) ^ 4)) Picture1.Line (X1, Y1)-(X2, Y2), RGB(0, 0, 0) Next i For x = 0 To 200 Step 10 Picture1.Line (x, -0.0255)-(x, 0), RGB(0, 0, 255) Next x For y = -0.0255 To 0 Step (0.0255 / 13) Picture1.Line (0, y)-(210, y), RGB(0, 0, 255) Next y End Sub Private Sub toMain_Click() Main.Show Pogr_compare.Hide End Sub