用vb实现利用三次样条插值函数进行编程 问题内容: 要求输入节点数,节点值与端点二阶导数,能获得屏幕输出插值函数表达式 网友 cz5360 于 提问 最佳回答: vb三次样条插值函数绘图 Dim X(1000) As Single, Y(1000) As Single Dim u1(0 To 80000) As Single, v1(0 To 80000) As Single Dim num As Long Dim t As Integer Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Dim de As Integer Dim ToInit As Boolean Dim DownX As Single, DownY As Single Sub Drawposi(Index As Integer) Me.Picture1.ForeColor = 0 Me.Picture1.Line (0, Y(Index))-(1024, Y(Index)) Me.Picture1.Line (X(Index), 0)-(X(Index), 770) End Sub Function hypot(ByVal X As Single, ByVal Y As Single) hypot = Sqr(X ^ 2 + Y ^ 2) End Function Sub MovePic(Index As Integer) Dim i As Integer X(Index) = Picture2(Index).Left + 4 Y(Index) = Picture2(Index).Top + 4 lblX.Caption = "X: " + CStr(CInt(X(Index))) lblY.Caption = "Y: " + CStr(CInt(Y(Index))) lblX.Refresh lblY.Refresh Me.Picture1.Cls Me.Picture1.ForeColor = QBColor(10) For i = 0 To t - 1 Me.Picture1.CurrentX = X(i) + 4 Me.Picture1.CurrentY = Y(i) + 4 Me.Picture1.Print i Next i End Sub Private Sub Command1_Click() Dim i As Long 'Picture1.Scale (0, 0)-(640, 550) DrawWidth = 3 Picture1.Cls 'If Check1.Value Then Command2_Click 'X(0) = 1 'Y(0) = 1 'X(t - 1) = 638 'Y(t - 1) = 548 Picture1.ForeColor = QBColor(10) For i = 0 To t - 1 Picture1.Line (X(i) - 1, Y(i) - 1)-(X(i) + 1, Y(i) + 1), QBColor(10), B Picture1.Print i Next i Picture1.ForeColor = QBColor(12) DrawWidth = 1 tspLine t - 1, 2, 0, 0, 0, 0 Picture1.PSet (u1(0), v1(0)) For i = 1 To num - 1 Picture1.Line -(u1(i), v1(i)) 'For de = 1 To 12000: Next de 'Sleep 1 Next i Picture1.ForeColor = QBColor(10) For i = 0 To t - 1 Picture1.Line (X(i) - 1,...