直线插补程序

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Private Sub Command1_Click()

Dim i As Single

x0 = 4000

y0 = 7200

Picture1.Line (x0, y0)-(x0, 100)

Picture1.Line (x0, 100)-(x0 + 100, 300)

Picture1.Line (x0, 100)-(x0 - 100, 300)

Picture1.Line (x0 + 300, y0 / 2)-(x0 + 300, y0 / 2 - 80) Picture1.Line (x0 + 600, y0 / 2)-(x0 + 600, y0 / 2 - 80) Picture1.Line (x0 + 900, y0 / 2)-(x0 + 900, y0 / 2 - 80) Picture1.Line (x0 + 1200, y0 / 2)-(x0 + 1200, y0 / 2 - 80) Picture1.Line (x0 + 1500, y0 / 2)-(x0 + 1500, y0 / 2 - 80) Picture1.Line (x0 + 1800, y0 / 2)-(x0 + 1800, y0 / 2 - 80) Picture1.Line (x0 + 2100, y0 / 2)-(x0 + 2100, y0 / 2 - 80) Picture1.Line (x0 + 2400, y0 / 2)-(x0 + 2400, y0 / 2 - 80) Picture1.Line (x0 + 2700, y0 / 2)-(x0 + 2700, y0 / 2 - 80) Picture1.Line (x0 + 3000, y0 / 2)-(x0 + 3000, y0 / 2 - 80)

Picture1.Line (x0 - 300, y0 / 2)-(x0 - 300, y0 / 2 - 80) Picture1.Line (x0 - 600, y0 / 2)-(x0 - 600, y0 / 2 - 80) Picture1.Line (x0 - 900, y0 / 2)-(x0 - 900, y0 / 2 - 80) Picture1.Line (x0 - 1200, y0 / 2)-(x0 - 1200, y0 / 2 - 80) Picture1.Line (x0 - 1500, y0 / 2)-(x0 - 1500, y0 / 2 - 80) Picture1.Line (x0 - 1800, y0 / 2)-(x0 - 1800, y0 / 2 - 80) Picture1.Line (x0 - 2100, y0 / 2)-(x0 - 2100, y0 / 2 - 80) Picture1.Line (x0 - 2400, y0 / 2)-(x0 - 2400, y0 / 2 - 80) Picture1.Line (x0 - 2700, y0 / 2)-(x0 - 2700, y0 / 2 - 80) Picture1.Line (x0 - 3000, y0 / 2)-(x0 - 3000, y0 / 2 - 80)

Picture1.Line (x0, y0 / 2 + 300)-(x0 + 80, y0 / 2 + 300) Picture1.Line (x0, y0 / 2 + 600)-(x0 + 80, y0 / 2 + 600) Picture1.Line (x0, y0 / 2 + 900)-(x0 + 80, y0 / 2 + 900) Picture1.Line (x0, y0 / 2 + 1200)-(x0 + 80, y0 / 2 + 1200) Picture1.Line (x0, y0 / 2 + 1500)-(x0 + 80, y0 / 2 + 1500) Picture1.Line (x0, y0 / 2 + 1800)-(x0 + 80, y0 / 2 + 1800) Picture1.Line (x0, y0 / 2 + 2100)-(x0 + 80, y0 / 2 + 2100) Picture1.Line (x0, y0 / 2 + 2400)-(x0 + 80, y0 / 2 + 2400) Picture1.Line (x0, y0 / 2 + 2700)-(x0 + 80, y0 / 2 + 2700) Picture1.Line (x0, y0 / 2 + 3000)-(x0 + 80, y0 / 2 + 3000)

Picture1.Line (x0, y0 / 2 - 300)-(x0 + 80, y0 / 2 - 300)

Picture1.Line (x0, y0 / 2 - 600)-(x0 + 80, y0 / 2 - 600)

Picture1.Line (x0, y0 / 2 - 900)-(x0 + 80, y0 / 2 - 900)

Picture1.Line (x0, y0 / 2 - 1200)-(x0 + 80, y0 / 2 - 1200)

Picture1.Line (x0, y0 / 2 - 1500)-(x0 + 80, y0 / 2 - 1500)

Picture1.Line (x0, y0 / 2 - 1800)-(x0 + 80, y0 / 2 - 1800)

Picture1.Line (x0, y0 / 2 - 2100)-(x0 + 80, y0 / 2 - 2100)

Picture1.Line (x0, y0 / 2 - 2400)-(x0 + 80, y0 / 2 - 2400)

Picture1.Line (x0, y0 / 2 - 2700)-(x0 + 80, y0 / 2 - 2700)

Picture1.Line (x0, y0 / 2 - 3000)-(x0 + 80, y0 / 2 - 3000)

Picture1.Line (x0 - 3200, y0 / 2)-(x0 + 3400, y0 / 2)

Picture1.Line (x0 + 3400, y0 / 2)-(x0 + 3200, y0 / 2 + 100)

Picture1.Line (x0 + 3400, y0 / 2)-(x0 + 3200, y0 / 2 - 100)

Picture1.CurrentX = x0 - 100: Picture1.CurrentY = y0 / 2: Picture1.Print "0" Picture1.CurrentX = x0 + 200: Picture1.CurrentY = 100: Picture1.Print "y" Picture1.CurrentX = 7400: Picture1.CurrentY = y0 / 2: Picture1.Print "x"

Picture1.CurrentX = x0 + 280: Picture1.CurrentY = y0 / 2: Picture1.Print "1" Picture1.CurrentX = x0 + 580: Picture1.CurrentY = y0 / 2: Picture1.Print "2" Picture1.CurrentX = x0 + 880: Picture1.CurrentY = y0 / 2: Picture1.Print "3" Picture1.CurrentX = x0 + 1180: Picture1.CurrentY = y0 / 2: Picture1.Print "4" Picture1.CurrentX = x0 + 1480: Picture1.CurrentY = y0 / 2: Picture1.Print "5" Picture1.CurrentX = x0 + 1780: Picture1.CurrentY = y0 / 2: Picture1.Print "6" Picture1.CurrentX = x0 + 2080: Picture1.CurrentY = y0 / 2: Picture1.Print "7" Picture1.CurrentX = x0 + 2380: Picture1.CurrentY = y0 / 2: Picture1.Print "8" Picture1.CurrentX = x0 + 2680: Picture1.CurrentY = y0 / 2: Picture1.Print "9" Picture1.CurrentX = x0 + 2980: Picture1.CurrentY = y0 / 2: Picture1.Print "10"

Picture1.CurrentX = x0 - 400: Picture1.CurrentY = y0 / 2: Picture1.Print "-1" Picture1.CurrentX = x0 - 700: Picture1.CurrentY = y0 / 2: Picture1.Print "-2" Picture1.CurrentX = x0 - 1000: Picture1.CurrentY = y0 / 2: Picture1.Print "-3" Picture1.CurrentX = x0 - 1300: Picture1.CurrentY = y0 / 2: Picture1.Print "-4" Picture1.CurrentX = x0 - 1600: Picture1.CurrentY = y0 / 2: Picture1.Print "-5" Picture1.CurrentX = x0 - 1900: Picture1.CurrentY = y0 / 2: Picture1.Print "-6" Picture1.CurrentX = x0 - 2200: Picture1.CurrentY = y0 / 2: Picture1.Print "-7" Picture1.CurrentX = x0 - 2500: Picture1.CurrentY = y0 / 2: Picture1.Print "-8" Picture1.CurrentX = x0 - 2800: Picture1.CurrentY = y0 / 2: Picture1.Print "-9" Picture1.CurrentX = x0 - 3100: Picture1.CurrentY = y0 / 2: Picture1.Print "-10"

相关文档
最新文档