vb圓弧插補(bǔ)程序_第1頁
vb圓弧插補(bǔ)程序_第2頁
vb圓弧插補(bǔ)程序_第3頁
vb圓弧插補(bǔ)程序_第4頁
全文預(yù)覽已結(jié)束

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、Private Sub Command1_Click()Const pi = 3.14159265Picture1.ForeColor = vbBlackPicture1.DrawWidth = 2Picture1.Line (50, 500)-(50, 5500)Picture1.Line (50, 5500)-(6500, 5500)Picture1.Line (80, 600)-(50, 500)Picture1.Line (20, 600)-(50, 500)Picture1.Line (6400, 5450)-(6500, 5500)Picture1.Line (6400, 5550

2、)-(6500, 5500)Picture1.ForeColor = vbRedPicture1.DrawWidth = 3If Int(Text1) = 0 ThenPicture1.Circle (50, 5500), Sqr(Int(Text1) * Int(Text1) + Int(Text2) * Int(Text2) * 400, , Atn(Int(Text4) / Int(Text3), pi / 2ElsePicture1.Circle (50, 5500), Sqr(Int(Text1) *Int(Text1) + Int(Text2) * Int(Text2) * 400

3、, , Atn(Int(Text4) / Int(Text3), Atn(Int(Text2) / Int(Text1)End IfEnd SubPrivate Sub Command2_Click()Dim k, m, j, l, n, F(20) As Integerm = 0l = Text1.Textk = Text2.TextF(m) = 0Picture1.ForeColor = vbGreenPicture1.DrawWidth = 3j = Abs(Int(Text1) - Int(Text3) + Abs(Int(Text2) - Int(Text4)Form1.Curren

4、tX = 200Print 初始:進(jìn)給方向 & F(m)=0 & X0=& Int(Textl) & Y0= & Int(Text2) & 匯= & jFor n = 1 To jIf F(m) = 0 And j 0 Thenm = m + 1k = k - 1F(m) = F(m - 1) - 2 * Abs(k + 1) + 1Picture1.Line (50 + 400 * l, 5500 - k * 400)-(50 + 400 * l, 5500 - (k + 1) * 400)Form1.CurrentX = 200Form1.CurrentY = 200 + m * 300P

5、rint 第 & m & 步 & - yF( & m &)= & F(m) & & x= & l & & y=;k & 注& j - nElsel = l + 1m = m + 1Picture1.Line (50 + 400 * l, 5500 - k * 400)-(50 + 400 * (l - 1), 5500 - k * 400)F(m) = F(m - 1) + 2 * Abs(l - 1) + 1Form1.CurrentX = 200Form1.CurrentY = 200 + m * 300Print 第 & m & 步 & + x F( & m & )= & F(m) &

6、& x=; l & & y=;k & 注& j - nEnd IfNext nEnd SubPrivate Sub Command3_Click()Text1.Text = Text3.Text = End SubPrivate Sub Command4_Click()Form1.CurrentY = 200EndPrivate Sub Command1_Click()Picture1.ForeColor = vbBlackPicture1.DrawWidth = 2Picture1.Line (7500, 8500)-(7500, 500)Picture1.Line (7500, 500)-

7、(500, 500)Picture1.Line (7500, 8500)-(7400, 8400)Picture1.Line (7500, 8500)-(7600, 8400)Picture1.Line (500, 500)-(600, 600)Picture1.Line (500, 500)-(600, 400)Picture1.ForeColor = vbRedPicture1.DrawWidth = 5Picture1.Line (7500, 500)-(7500 + 400 *Int(Text3), 500 - 400 * Int(Text4)End SubPrivate Sub Co

8、mmand2_Click()Form1.ClsDim k, m, j, l, n, F(20) As Integerm = 0l = 0k = 0F(m) = 0Picture1.ForeColor = vbGreenPicture1.DrawWidth = 3j = Abs(Int(Text3) + Abs(Int(Text4)Form1.CurrentX = 200Form1.CurrentY = 200Print 初始:進(jìn)給方向 & F(m)=0 & Xe=& Int(Text3) & Ye= & Int(Text4) & 匯= & jFor n = 1 To jIf F(m) = 0

9、And j 0 Thenm = m + 1l = l - 1Picture1.Line (7500 + 400 * (l + 1), 500 - k * 400)-(7500 + 400 * (l), 500 - k * 400)Form1.CurrentX = 200Form1.CurrentY = 200 + m * 300Print 第 & m & 步 & x F( & m & )= & F(m) & & x= & l & & y=; k & E= & j - nElsek = k - 1m = m + 1Picture1.Line (7500 + 400 * l, 500 - (k +

10、 1) * 400)-(7500 + 400 * l, 500 - k * 400)F(m) = F(m - 1) + Abs(Int(Text3)Form1.CurrentX = 200Form1.CurrentY = 200 + m * 300Print 第 & m & 步 & y F( & m & ) & F(m) & & x=; l & & y=; k & E= & j - nEnd IfNext nEnd SubPrivate Sub Command3_Click()Text1.Text = Text2.Text = Picture1.ClsForm1.ClsEnd SubPriva

11、te Sub Command4_Click()EndEnd SubPrivate Sub Form_Load()End SubIf F = m And G = m ThenPrivate Sub Command1_Click()Const pi = 3.14159265Picture1.ForeColor = vbBlackPicture1.DrawWidth = 2Picture1.Line (50, 500)-(50, 5500)Picture1.Line (50, 5500)-(6500, 5500)Picture1.Line (80, 600)-(50, 500)Picture1.Li

12、ne (20, 600)-(50, 500)Picture1.Line (6400, 5450)-(6500, 5500)Picture1.Line (6400, 5550)-(6500, 5500)Picture1.ForeColor = vbRedPicture1.DrawWidth = 3Picture1.Line (50, 5500)-(50 + 400 * Int(Text3), 5500 - 400 * Int(Text4)End SubPrivate Sub Command2_Click()Dim k, m, j, l, n, F, G As Integerl = 0 k = 0

13、 F = 0 G = 0Picture1.ForeColor = vbGreenPicture1.DrawWidth = 3n = Int(Text5)j = 2 A nm = 2 A nForm1.CurrentX = 200Form1.CurrentY = 200Print 累加次數(shù) & F= F + int (text3) & +M & G=G +int(text4) & + 兇 ;匯=& jPrint n & 0 & 0 &0 & 0 & jFor n = 1 To ml = l + 1 k = k + 1Picture1.Line (50 + 400 * (l - 1), 5500

14、- (k - 1) 400)-(50 + 400 * (l), 5500 - k * 400)F = F - mG = G - mPrint ; n & & F & &1 & & G & & 1 & &j - 1ElseIf F = m And G m Thenl = l + 1F = F - mPrint ; n & & F & &1 & & G & & 0 & &j - 1Picture1.Line (50 + 400 * (l - 1), 5500 - k * 400)-(50 + 400 * (l), 5500 - k * 400)ElseIf F = m Thenk = k + 1 G = G - mPicture1.Line (50 + 400 * l, 5500 - (k - 1) * 400)-(50 + 400 * (l), 5500 - k * 400) TOC o 1-5 h z Print ; n & & F & &0 & & G & & 1 & &

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論