#逐点比较法三、四象限逆圆插补计算 下载本文

内容发布更新时间 : 2025/1/7 13:20:06星期一 下面是文章的全部内容请认真阅读。

逐点比较法三、四象限逆圆插补计算

第三象限

第四象限

Private Sub Command1_Click(> Picture1.ForeColor = vbBlack Picture1.DrawWidth = 2

Picture1.Line (500, 1000>-(8500, 1000> '画直线坐标轴 Picture1.Line (4500, 1000>-(4500, 5000>

Picture1.CurrentX = 230 '当前位置 Picture1.CurrentY = 900

Picture1.Print \坐标轴标注 Picture1.CurrentX = 4300

1 / 7

Picture1.CurrentY = 800 Picture1.Print \Picture1.CurrentX = 8650 Picture1.CurrentY = 900 Picture1.Print \

Picture1.CurrentX = 4400 Picture1.CurrentY = 5100 Picture1.Print \

Picture1.Line (500, 1000>-(600, 950> '箭头 Picture1.Line (500, 1000>-(600, 1050> Picture1.Line (8500, 1000>-(8400, 950> Picture1.Line (8500, 1000>-(8400, 1050> Picture1.Line (4500, 5000>-(4450, 4900> Picture1.Line (4500, 5000>-(4550, 4900> End Sub

Private Sub 坐标判别_Click(>

If Not (Option1.Value = True Or Option2.Value = True> Then ans = MsgBox(\出错了,请选择象限\提示信息\End If

Dim a, b, c, d, n, m As Integer Dim r As Single a = Val(Text1.Text> b = Val(Text2.Text> c = Val(Text3.Text> d = Val(Text4.Text> n = a * a + b * b m = c * c + d * d r = Sqr(n>

If Option1.Value = True Then

If Not (a <= 0 And b <= 0 And c <= 0 And d <= 0> Then GoTo ww

ElseIf Not (a < c And b > d> Then GoTo ww1

ElseIf n <> m Then GoTo ww2 End If End If

If Option2.Value = True Then

If Not (a >= 0 And b <= 0 And c >= 0 And d <= 0> Then GoTo ww

ElseIf Not (a < c And b < d> Then GoTo ww1

ElseIf n <> m Then GoTo ww2

2 / 7

End If End If GoTo ww4

ww: ans = MsgBox(\出错了,逆圆弧起点、终点不在该象限,请重新输入\提示信息\ GoTo ww3

ww1: ans = MsgBox(\出错了,逆圆弧起点、终点位置错误,请重新输入\提示信息\ GoTo ww3

ww2: ans = MsgBox(\出错了,该象限所绘圆弧不以原点为圆心,请重新输入\提示信息\ ww3: Text1.Text = \ Text2.Text = \ Text3.Text = \ Text4.Text = \ Text1.SetFocus GoTo ww4 ww4: End Sub

Private Sub Command4_Click(>

If Not (Option1.Value = True Or Option2.Value = True> Then ans = MsgBox(\出错了,请选择象限\提示信息\End If

Dim a, b, c, d, n, m As Integer Dim r As Single a = Val(Text1.Text> b = Val(Text2.Text> c = Val(Text3.Text> d = Val(Text4.Text> n = a * a + b * b m = c * c + d * d r = Sqr(n>

If Option1.Value = True Then

If Not (a <= 0 And b <= 0 And c <= 0 And d <= 0> Then GoTo ww

ElseIf Not (a < c And b > d> Then GoTo ww1

ElseIf n <> m Then GoTo ww2 End If End If

If Option2.Value = True Then

If Not (a >= 0 And b <= 0 And c >= 0 And d <= 0> Then GoTo ww

ElseIf Not (a < c And b < d> Then

3 / 7