[问题点数:20分,结帖人tianxueer]
等级
本版专家分:0
结帖率 99.19%
如题。谢谢!
展开阅读全文
等级
本版专家分:8880
Option Explicit
Private Sub Form_Load()
Dim dX As Double, dY As Double
Dim dX1 As Double, dY1 As Double
Dim intCenter As Integer
Me.AutoRedraw = True
Me.ScaleMode = 0
Me.Scale (0, 0)-(10, 10)
intCenter = Me.ScaleHeight / 2
dY1 = Tan(0)
For dX = 0.01 To Me.ScaleWidth Step 0.01
dY = Tan(dX)
Me.Line (dX1, dY1 + intCenter)-(dX, dY + intCenter)
dX1 = dX
dY1 = dY
Next
End Sub
等级
本版专家分:8880
不好意思,,看错了,,把Tan换成Atn就可以了,,你也可以换成Sin(正玄)、Cos(余玄)
比如画正玄曲线:
Option Explicit
Private Sub Form_Load()
Dim dX As Double, dY As Double
Dim dX1 As Double, dY1 As Double
Dim intCenter As Integer
Me.AutoRedraw = True
Me.ScaleMode = 0
Me.Scale (0, 0)-(10, 10)
intCenter = Me.ScaleHeight / 2
dY1 = Sin(0)'《----这里
For dX = 0.01 To Me.ScaleWidth Step 0.01
dY = Sin(dX)'《---和这里换了就好了
Me.Line (dX1, dY1 + intCenter)-(dX, dY + intCenter)
dX1 = dX
dY1 = dY
Next
End Sub
等级
本版专家分:8880
晕倒!!!!看错题了,,,Tan是正切,,,Atn是余切!!! -_-#
等级
本版专家分:0
Rick110AAA(海牛猪猪 And HerosⅢ之比蒙),你画的不对,你用几何画板试一下
等级
本版专家分:0
就是Tan,还是不对
等级
本版专家分:0