在vb中将一个圆分成60份 画出他的节点 帮忙看下那错了 最好有一个给过的结果 谢了
PrivateSubForm_Activate()Dimr,x,y,x0,y0,x2,y2DimnAsIntegerx=3480:y=2640Forn=0To59Line...
Private Sub Form_Activate()
Dim r, x, y, x0, y0, x2, y2
Dim n As Integer
x = 3480: y = 2640
For n = 0 To 59
Line (1500 * Sin(6 * n) + x, 1500 * Cos(6 * n) + y)-(1400 * Sin(6 * n) + x, 1400 * Cos(6 * n) + y)
Next n
End Sub 展开
Dim r, x, y, x0, y0, x2, y2
Dim n As Integer
x = 3480: y = 2640
For n = 0 To 59
Line (1500 * Sin(6 * n) + x, 1500 * Cos(6 * n) + y)-(1400 * Sin(6 * n) + x, 1400 * Cos(6 * n) + y)
Next n
End Sub 展开
展开全部
三角函数用的是弧度
Private Sub Form_Activate()
Dim r, x, y, x0, y0, x2, y2
Dim n As Integer
x = 3480: y = 2640
Dim pi As Double
pi = 3.14159265 / 180
For n = 0 To 59
Line (1500 * Sin(6 * n * pi) + x, 1500 * Cos(6 * n * pi) + y)-(1400 * Sin(6 * n * pi) + x, 1400 * Cos(6 * n * pi) + y)
Next n
End Sub
Private Sub Form_Activate()
Dim r, x, y, x0, y0, x2, y2
Dim n As Integer
x = 3480: y = 2640
Dim pi As Double
pi = 3.14159265 / 180
For n = 0 To 59
Line (1500 * Sin(6 * n * pi) + x, 1500 * Cos(6 * n * pi) + y)-(1400 * Sin(6 * n * pi) + x, 1400 * Cos(6 * n * pi) + y)
Next n
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询