VB太极图如何画
答案:3 悬赏:0 手机版
解决时间 2021-03-28 00:20
- 提问者网友:最爱你的唇
- 2021-03-27 16:03
VB太极图如何画
最佳答案
- 五星知识达人网友:动情书生
- 2021-03-27 16:11
Private Sub Form_Click()
pi = 3.1415926
DrawWidth = 3
x = Form1.Width 2
y = (Form1.Height - 400) 2
r = Form1.Height 3
Circle (x, y), r
Circle (x - r 2, y), r / 2, , pi, 2 * pi
Circle (x + r 2, y), r / 2, , 0, pi
Line (x - r, y)-(x - r 2, y)
Line (x - r 2 + 100, y)-(x + r 2, y)
Line (x + r 2 + 100, y)-(x + r, y)
End Sub
追问选择我能看懂那个
pi = 3.1415926
DrawWidth = 3
x = Form1.Width 2
y = (Form1.Height - 400) 2
r = Form1.Height 3
Circle (x, y), r
Circle (x - r 2, y), r / 2, , pi, 2 * pi
Circle (x + r 2, y), r / 2, , 0, pi
Line (x - r, y)-(x - r 2, y)
Line (x - r 2 + 100, y)-(x + r 2, y)
Line (x + r 2 + 100, y)-(x + r, y)
End Sub
追问选择我能看懂那个
全部回答
- 1楼网友:往事隔山水
- 2021-03-27 17:35
Private Sub Form_Click()
Const pi = 3.141592654
Dim i As Double
Dim y As Double
ScaleMode = vbMillimeters '以mm为单
DrawWidth = 2 '设置 DrawWidth。
Scale (-5, 5)-(5, -5)
For i = 0 To 2 * pi Step 0.005
PSet (2 * Cos(i), 2 * Sin(i)), vbRed
Next i
For i = 0 To pi Step 0.001
PSet (1 + 1 * Cos(i), 1 * Sin(i)), vbRed
Next
For i = pi To 2 * pi Step 0.001
PSet (-1 + 1 * Cos(i), 1 * Sin(i)), vbRed
Next
For i = -2 To 1.95 Step 0.2
Line (i, 0)-(i + 0.05, 0), vbRed
Next
End Sub
追问那条采纳了追答Private Sub Form_Click()
Const pi = 3.141592654
Dim i As Double
ScaleMode = vbMillimeters '以mm为单
DrawWidth = 2 '设置 DrawWidth。
Scale (-5, 5)-(5, -5)
For i = 0 To 2 * pi Step 0.005
PSet (2 * Cos(i), 2 * Sin(i)), vbRed
Next i
For i = 0 To pi Step 0.001
PSet (1 + 1 * Cos(i), 1 * Sin(i)), vbRed
Next
For i = pi To 2 * pi Step 0.001
PSet (-1 + 1 * Cos(i), 1 * Sin(i)), vbRed
Next
For i = -2 To 1.7 Step 0.5
Line (i, 0)-(i + 0.3, 0), vbRed
Next
End Sub追问这个不行,圆不太正规追答你愿采纳哪一个是你的权利。
Const pi = 3.141592654
Dim i As Double
Dim y As Double
ScaleMode = vbMillimeters '以mm为单
DrawWidth = 2 '设置 DrawWidth。
Scale (-5, 5)-(5, -5)
For i = 0 To 2 * pi Step 0.005
PSet (2 * Cos(i), 2 * Sin(i)), vbRed
Next i
For i = 0 To pi Step 0.001
PSet (1 + 1 * Cos(i), 1 * Sin(i)), vbRed
Next
For i = pi To 2 * pi Step 0.001
PSet (-1 + 1 * Cos(i), 1 * Sin(i)), vbRed
Next
For i = -2 To 1.95 Step 0.2
Line (i, 0)-(i + 0.05, 0), vbRed
Next
End Sub
追问那条采纳了追答Private Sub Form_Click()
Const pi = 3.141592654
Dim i As Double
ScaleMode = vbMillimeters '以mm为单
DrawWidth = 2 '设置 DrawWidth。
Scale (-5, 5)-(5, -5)
For i = 0 To 2 * pi Step 0.005
PSet (2 * Cos(i), 2 * Sin(i)), vbRed
Next i
For i = 0 To pi Step 0.001
PSet (1 + 1 * Cos(i), 1 * Sin(i)), vbRed
Next
For i = pi To 2 * pi Step 0.001
PSet (-1 + 1 * Cos(i), 1 * Sin(i)), vbRed
Next
For i = -2 To 1.7 Step 0.5
Line (i, 0)-(i + 0.3, 0), vbRed
Next
End Sub追问这个不行,圆不太正规追答你愿采纳哪一个是你的权利。
- 2楼网友:玩家
- 2021-03-27 16:29
'更简单的一个。看看吧。朋友。
Const pi = 3.1415926
Private Sub Command1_Click()
Me.ForeColor = vbRed
Dim x!, y!, r!
x = Me.ScaleWidth / 3
y = Me.ScaleHeight / 3
r = x / 2
Circle (x, y), r
r1 = r / 2
X1 = x - r / 2
X2 = x + r / 2
Circle (X1, y), r1, , pi, 0.001
Circle (X2, y), r1, , 0.001, pi
DrawStyle = vbDash
Line (x - r, y)-(x + r, y)
End Sub追问这个看起来有点难理解
Const pi = 3.1415926
Private Sub Command1_Click()
Me.ForeColor = vbRed
Dim x!, y!, r!
x = Me.ScaleWidth / 3
y = Me.ScaleHeight / 3
r = x / 2
Circle (x, y), r
r1 = r / 2
X1 = x - r / 2
X2 = x + r / 2
Circle (X1, y), r1, , pi, 0.001
Circle (X2, y), r1, , 0.001, pi
DrawStyle = vbDash
Line (x - r, y)-(x + r, y)
End Sub追问这个看起来有点难理解
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯