《凸輪程序的設(shè)計》由會員分享,可在線閱讀,更多相關(guān)《凸輪程序的設(shè)計(4頁珍藏版)》請在裝配圖網(wǎng)上搜索。
1、習題4-1凸輪輪廓曲線的程序設(shè)計10級機制班 丁林森 2010001630211、 C語言程序/各字母含義 e偏距、基圓半徑ro、滾子半徑rt、行程h、推程運動角phi1、遠休止角phis、回程、運動角phi_1,近休止角phi_s#include #include #define PI 3.1415926 void main() double e=10.0,ro=40.0,rt=10.0,h=20.0,phi1=150.0,phis=30.0,phi_1=120.0,phi_s=60; double s, alp73,x73,y73,x1,y1,xr73,yr73; double ic,ic
2、1,ic2,ic3,ic4,so,s1,cop,sip,phi,gam,bel,del=5.0,q,t; int i; gam=phi1+phis; bel=phi1+phis+phi_1; ic=(int)(360.0/del); ic1=(int)(phi1/del); ic2=(int)(gam/del); ic3=(int)(phi1+phis+phi_1/2.0)/del); ic4=(int)(bel/del); so=sqrt(ro*ro-e*e); printf( No deg x/mm y/mm X/mm Y/mm radn); for(i=0;i=ic;i+) / phi=
3、i*del*PI/180.0; cop=cos(phi); sip=sin(phi); if(i=ic1) s=h/2.0*(1.0-cos(180.0*phi/phi1); s1=h*PI*sin(180.0*phi/phi1)/2.0/phi1; x1=-(s+so)*sip+s1*cop-e*cop; y1=(s+so)*cop+s1*sip-e*sip; else if(i=ic2) s=h; s1=0; x1=-(s+so)*sip-e*cop; y1=(so+s)*cop-e*sip; else if(i=ic3) s=h-2.0*h*(phi-gam)*(phi-gam)/phi
4、_1/phi_1; s1=-4.0*h*(phi-gam)/phi_1/phi_1; x1=s1*cop-(s+so)*sip-e*cop; y1=s1*sip+(so+s)*cop-e*sip; else if(i=ic4) s=2.0*h*(bel-phi)*(bel-phi)/phi_1/phi_1; s1=-4.0*h*(bel-phi)/phi_1/phi_1; x1=s1*cop-(so+s)*sip-e*cop; y1=s1*sip+(so+s)*cop-e*sip; else s=0; s1=0; x1=-(s+so)*sip-e*cop; y1=so*cop-e*sip; t
5、=fabs(s1-e); alpi=atan2(t,(s+so); q=rt/sqrt(x1*x1+y1*y1); / xi=(s+so)*cop-e*sip; yi=(s+so)*sip+e*cop; xri=xi-q*y1; yri=yi+q*x1; phi=i*del; printf(n%2d%12.3f%12.3f%12.3f%12.3f%12.3f%12.3f,i+1,phi,xi,yi,xri,yri,alpi); 2、 計算結(jié)果No deg x/mm y/mm X/mm Y/mm rad 1 0.000 38.730 10.000 29.047 7.500 0.253 2 5.0
6、00 37.765 13.342 28.335 10.016 0.252 3 10.000 36.620 16.611 27.509 12.490 0.250 4 15.000 35.295 19.810 26.567 14.929 0.248 5 20.000 33.786 22.939 25.502 17.339 0.245 6 25.000 32.089 25.997 24.304 19.721 0.242 7 30.000 30.195 28.980 22.960 22.076 0.238 8 35.000 28.094 31.879 21.458 24.398 0.234 9 40.
7、000 25.776 34.682 19.782 26.677 0.230 10 45.000 23.230 37.372 17.919 28.899 0.226 11 50.000 20.449 39.927 15.855 31.044 0.221 12 55.000 17.426 42.321 13.581 33.090 0.216 13 60.000 14.160 44.525 11.089 35.008 0.212 14 65.000 10.652 46.506 8.379 36.768 0.207 15 70.000 6.912 48.229 5.452 38.336 0.203 1
8、6 75.000 2.953 49.658 2.318 39.678 0.198 17 80.000 -1.205 50.755 -1.008 40.757 0.194 18 85.000 -5.534 51.487 -4.504 41.540 0.190 19 90.000 -10.000 51.820 -8.142 41.994 0.187 20 95.000 -14.564 51.725 -11.887 42.090 0.184 21 100.000 -19.178 51.177 -15.700 41.802 0.181 22 105.000 -23.793 50.159 -19.534
9、 41.111 0.178 23 110.000 -28.352 48.659 -23.341 40.005 0.176 24 115.000 -32.798 46.673 -27.068 38.477 0.174 25 120.000 -37.070 44.208 -30.661 36.532 0.172 26 125.000 -41.109 41.275 -34.065 34.178 0.171 27 130.000 -44.856 37.900 -37.226 31.435 0.170 28 135.000 -48.253 34.111 -40.094 28.330 0.169 29 1
10、40.000 -51.250 29.950 -42.620 24.898 0.169 30 145.000 -53.800 25.463 -44.762 21.182 0.168 31 150.000 -55.862 20.705 -46.485 17.229 0.169 32 155.000 -57.453 15.757 -47.810 13.112 0.169 33 160.000 -58.608 10.690 -48.770 8.896 0.169 34 165.000 -59.317 5.541 -49.360 4.611 0.169 35 170.000 -59.574 0.350
11、-49.574 0.291 0.169 36 175.000 -59.378 -4.843 -49.411 -4.030 0.169 37 180.000 -58.730 -10.000 -48.872 -8.321 0.169 38 185.000 -57.635 -15.081 -47.960 -12.549 0.169 39 190.000 -56.072 -20.041 -46.656 -16.673 0.169 40 195.000 -54.109 -24.851 -45.023 -20.675 0.169 41 200.000 -51.736 -29.472 -43.049 -24
12、.520 0.169 42 205.000 -48.969 -33.868 -40.746 -28.177 0.169 43 210.000 -45.829 -38.007 -38.134 -31.620 0.169 44 215.000 -42.341 -41.855 -35.232 -34.823 0.169 45 220.000 -38.530 -45.385 -32.061 -37.759 0.169 46 225.000 -34.427 -48.569 -28.647 -40.409 0.169 47 230.000 -30.062 -51.383 -25.015 -42.750 0
13、.169 48 235.000 -25.468 -53.806 -21.193 -44.766 0.169 49 240.000 -20.680 -55.819 -17.210 -46.441 0.169 50 245.000 -7.306 -39.330 -5.481 -29.498 0.253 51 250.000 -3.867 -39.862 -2.896 -29.909 0.252 52 255.000 -0.379 -40.051 -0.278 -30.052 0.252 53 260.000 3.113 -39.934 2.342 -29.964 0.252 54 265.000
14、6.581 -39.513 4.944 -29.648 0.252 55 270.000 10.000 -38.792 7.510 -29.107 0.252 56 275.000 13.343 -37.775 10.019 -28.343 0.252 57 280.000 16.585 -36.470 12.451 -27.365 0.252 58 285.000 19.701 -34.888 14.790 -26.177 0.252 59 290.000 22.668 -33.041 17.016 -24.791 0.252 60 295.000 25.462 -30.942 19.113
15、 -23.216 0.252 61 300.000 28.063 -28.607 21.065 -21.463 0.252 62 305.000 30.406 -25.990 22.805 -19.492 0.253 63 310.000 32.555 -23.241 24.417 -17.431 0.253 64 315.000 34.457 -20.315 25.843 -15.236 0.253 65 320.000 36.097 -17.235 27.072 -12.926 0.253 66 325.000 37.461 -14.023 28.096 -10.517 0.253 67
16、330.000 38.541 -10.705 28.906 -8.028 0.253 68 335.000 39.327 -7.305 29.495 -5.479 0.253 69 340.000 39.814 -3.849 29.861 -2.887 0.253 70 345.000 39.998 -0.365 29.999 -0.274 0.253 71 350.000 39.878 3.123 29.908 2.342 0.253 72 355.000 39.454 6.586 29.591 4.940 0.253 73 360.000 38.730 10.000 29.047 7.500 0.253