资 源 简 介
通过逐点比较 与数字积分 两种算法对圆和直线 图像进行插补运算 ............................. VB源码Private Sub Command1_Click()
xe = Val(Text1.Text)
ye = Val(Text2.Text)
Picture1.Scale (-20, 20)-(20, -20)
Picture1.Cls
Picture1.Line (-20, 0)-(20, 0), vbBlue
Picture1.Line (19, 1)-(20, 0), vbbiue
Picture1.Line -(19, -1), vbBlue
Picture1.Print "X"
Picture1.Line (0, -20)-(0, 20), vbBlue
Picture1.Line (1, 19)-(0, 20), vbBlue
Picture1.Line -(-1, 19), vbBlue
Picture1.Print "Y"
Picture1.Line (0, 0)-(xe, ye), vbBlue
Picture1.Print "("; xe; ","; ye; ")"
If Text1.Text = none Or Text2.Text = none Then MsgBox "请输入加工终点坐标值。"
Text3.Text = 0
Text4.Text = 0
Text5.Text = 0
End Sub
Private Sub Command2_Click()
Dim sum As Integer
xe = Val(Text1.Text)
ye = Val(Text2.Text)
Xm = Val(Text3.Text)
Ym = Val(Text4.Text)
m = Val(Text5.Text)
sum = xe * Ym - Xm * ye
"第一象限开始
If xe > 0 And ye > 0 And sum >= 0 Then Picture1.Lin