如何实现4次曲线y=ax^4+bx^3+cx^2+dx+e的平移,绕点(x1,y1)旋转?
请提供方法或源码
平移的话应该就是加减X值吧~旋转就要靠版主了~
但是又觉得不大对~4次方应该一次有4组解~程序可能要倒过来写~用Ÿ值去求X值~
将座标存到数组中~最后再输出到EXCEL的图表~
但是X=?y+?y+?y+? 这我不会算~
这是试玩版的~
程序代码:
Option Explicit Const a = 1 Const b = 1 Const c = 1 Const d = 1 Const e = 1 Dim Result() As String Dim iCount As Long Private Sub Command1_Click() Dim i As Long, Temp() As String Text1.Text = Val(Text1.Text) For i = 0 To UBound(Result) Temp = Split(Result(i), ",") If UNound(Temp) = 1 Then Temp(0) = CStr(CLng(Temp(0)) + CLng(Text1.Text)) Result(i) = Temp(0) & "," & Temp(1) End If Erase Temp Next i End Sub Private Sub Form_Initialize() iCount = 0: ReDim Result(iCount) End Sub Private Sub Form_Load() Call AAA End Sub Private Sub AAA() Dim x As Double, y As Double iCount = 0: ReDim Result(iCount) For x = -100 To 100 ReDim Preserve Result(iCount) y = (((a * x) ^ 4) + ((b * x) ^ 3) + ((c * x) ^ 2) + (d * x) + e) Result(iCount) = x & "," & y iCount = iCount + 1 Next x End Sub
这样应该不对吧?