哈工大機械原理大作業(yè)——凸輪——9號_第1頁
哈工大機械原理大作業(yè)——凸輪——9號_第2頁
哈工大機械原理大作業(yè)——凸輪——9號_第3頁
哈工大機械原理大作業(yè)——凸輪——9號_第4頁
哈工大機械原理大作業(yè)——凸輪——9號_第5頁
已閱讀5頁,還剩7頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、凸輪機構(gòu)運動分析 班 級: 設(shè) 計 者: 學 號: 指導教師: 設(shè)計時間: 3、 源代碼Public r0, e, h, f, ff, w As DoublePublic f0, fs, f01, fs1 As DoublePublic s, v, a, x, y, x1, y1, q1, q2, rr As DoublePublic pi, pa, T, s0, i As DoublePublic dsdf, dxdf, dydf As DoublePrivate Sub pushcos()s = h / 2 * (1 - Cos(pi / f0 * f)v = pi * h * w / 2

2、 / f0 * Sin(pi / f0 * f)a = pi 2 * h * w 2 / 2 / f0 2 * Cos(pi / f0 * f)dsdf = h / 2 * Sin(pi / f0 * f) * pi / f0End SubPrivate Sub backsin()T = f - (f0 + fs)s = h * (1 - T / f01 + Sin(2 * pi / f01 * T) / 2 / pi)v = -h * w / f01 * (1 - Cos(2 * pi / f01 * T)a = -2 * pi * h * w 2 / f01 2 * Sin(2 * pi

3、/ f01 * T)dsdf = h * (-1 / f01 + Cos(2 * pi / f01 * T) / f01)End SubPrivate Sub pushstay()s = hv = 0a = 0dsdf = 0End SubPrivate Sub backstay()s = 0v = 0a = 0dsdf = 0End SubPrivate Sub pushaa()End SubPrivate Sub backcos()End SubPrivate Sub Command1_Click()Picture1.ClsPicture1.Scale (-30, 100)-(390, -

4、20)Picture1.Line (-30, 0)-(390, 0)Picture1.Line (0, 390)-(0, -20) For i = 0 To 360 Step 30Picture1.Line (i, 2)-(i, 0)Picture1.CurrentX = i - 10: Picture1.CurrentY = 0Picture1.Print iNext iFor i = 10 To 100 Step 10Picture1.Line (0, i)-(5, i)Picture1.CurrentX = -30: Picture1.CurrentY = i + 2Picture1.P

5、rint iNext i For ff = 0 To 360 Step 0.1f = ff * pas0 = Sqr(r0 2 - e 2)If f < f0 ThenCall pushcosElseIf f >= f0 And f < fs + f0 ThenCall pushstayElseIf f >= fs + f0 And f < fs + f0 + f01 ThenCall backsinElseIf f >= fs + f0 + f01 And f <= 2 * pi ThenCall backstayEnd IfPicture1.PSe

6、t (ff, s)Next ffEnd SubPrivate Sub Command2_Click()Picture1.ClsPicture1.Scale (-30, 150)-(390, -150)Picture1.Line (-30, 0)-(390, 0)Picture1.Line (0, 390)-(0, -150)For i = 0 To 360 Step 30Picture1.Line (i, 0.5)-(i, 0)Picture1.CurrentX = i - 10: Picture1.CurrentY = 0Picture1.Print iNext iFor i = -150

7、To 150 Step 10Picture1.Line (0, i)-(5, i)Picture1.CurrentX = -20: Picture1.CurrentY = i + 3Picture1.Print iNext i For ff = 0 To 360 Step 0.1f = ff * paIf f < f0 ThenCall pushcosElseIf f >= f0 And f < fs + f0 ThenCall pushstayElseIf f >= fs + f0 And f < fs + f0 + f01 ThenCall backsinEl

8、seIf f >= fs + f0 + f01 And f <= 360 ThenCall backstayEnd IfPicture1.PSet (ff, v)Next ffEnd SubPrivate Sub Command3_Click()Picture1.ClsPicture1.Scale (-30, 300)-(390, -300)Picture1.Line (-30, 0)-(390, 0)Picture1.Line (0, 390)-(0, -300) For i = 0 To 360 Step 30Picture1.Line (i, 0.25)-(i, 0)Pict

9、ure1.CurrentX = i - 10: Picture1.CurrentY = 0Picture1.Print iNext iFor i = -300 To 300 Step 20Picture1.Line (0, i)-(5, i)Picture1.CurrentX = -20: Picture1.CurrentY = i + 6Picture1.Print iNext i For ff = 0 To 360 Step 0.1f = ff * paIf f < f0 ThenCall pushcosElseIf f >= f0 And f < fs + f0 The

10、nCall pushstayElseIf f >= fs + f0 And f < fs + f0 + f01 ThenCall backsinElseIf f >= fs + f0 + f01 And f <= 360 ThenCall backstayEnd IfPicture1.PSet (ff, a)Next ffEnd SubPrivate Sub Command4_Click()Picture1.ClsPicture1.Scale (-100, 90)-(150, -90)Picture1.Line (-100, 0)-(390, 0)Picture1.Li

11、ne (0, 390)-(0, -90) For i = -100 To 150 Step 10Picture1.Line (i, 1)-(i, 0)Picture1.CurrentX = i - 2: Picture1.CurrentY = 0Picture1.Print Format(i, "0.#")Next iFor i = -90 To 360 Step 10Picture1.Line (0, i)-(2, i)Picture1.CurrentX = -10: Picture1.CurrentY = i + 3Picture1.Print iNext i For

12、ff = 0 To 360 Step 0.1f = ff * paIf f < f0 ThenCall pushcosElseIf f >= f0 And f < fs + f0 ThenCall pushstayElseIf f >= fs + f0 And f < fs + f0 + f01 ThenCall backsinElseIf f >= fs + f0 + f01 And f <= 360 ThenCall backstayEnd If Picture1.PSet (-dsdf, s)Next ffEnd SubPrivate Sub C

13、ommand5_Click()Picture1.ClsPicture1.Scale (-150, 150)-(150, -150)Picture1.Line (-150, 0)-(150, 0)Picture1.Line (0, 150)-(0, -150) For i = -150 To 150 Step 10Picture1.Line (i, 2)-(i, 0)Picture1.CurrentX = i - 10: Picture1.CurrentY = 0Picture1.Print iNext iFor i = -150 To 150 Step 10Picture1.Line (0,

14、i)-(5, i)Picture1.CurrentX = -30: Picture1.CurrentY = i + 2Picture1.Print iNext i For ff = 0 To 360 Step 0.1f = ff * pas0 = Sqr(r0 2 - e 2)If f < f0 ThenCall pushcosElseIf f >= f0 And f < fs + f0 ThenCall pushstayElseIf f >= fs + f0 And f < fs + f0 + f01 ThenCall backsinElseIf f >=

15、 fs + f0 + f01 And f <= 2 * pi ThenCall backstayEnd Ifx = (s + s0) * Cos(f) - e * Sin(f)y = (s + s0) * Sin(f) + e * Cos(f)Picture1.PSet (x, y)Next ffEnd SubPrivate Sub Command6_Click()Picture1.ClsPicture1.Scale (-150, 150)-(150, -150)Picture1.Line (-150, 0)-(150, 0)Picture1.Line (0, 150)-(0, -150

16、)For i = -150 To 150 Step 10Picture1.Line (i, 2)-(i, 0)Picture1.CurrentX = i - 10: Picture1.CurrentY = 0Picture1.Print iNext iFor i = -150 To 150 Step 10Picture1.Line (0, i)-(5, i)Picture1.CurrentX = -30: Picture1.CurrentY = i + 2Picture1.Print iNext i For ff = 0 To 360 Step 0.1f = ff * pas0 = Sqr(r

17、0 2 - e 2)If f < f0 ThenCall pushcosElseIf f >= f0 And f < fs + f0 ThenCall pushstayElseIf f >= fs + f0 And f < fs + f0 + f01 ThenCall backsinElseIf f >= fs + f0 + f01 And f <= 2 * pi ThenCall backstayEnd Ifx = (s + s0) * Cos(f) - e * Sin(f)y = (s + s0) * Sin(f) + e * Cos(f)dxdf = dsdf * Cos(f) - (s0 + s) * Sin(f) - e * Cos(f)dydf = dsdf * Sin(f) + (s0 + s) * Cos(f) - e * Sin(f)x1 = x - rr * dydf / Sqr(dxdf 2 + dydf 2)y1 = y + rr * dxdf / Sqr(dxdf 2 + dydf 2)Picture1.PSet (x, y

溫馨提示

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

評論

0/150

提交評論