- 82.07 KB
- 2022-09-27 发布
- 1、本文档由用户上传,淘文库整理发布,可阅读全部内容。
- 2、本文档内容版权归属内容提供方,所产生的收益全部归内容提供方所有。如果您对本文有版权争议,请立即联系网站客服。
- 3、本文档由用户上传,本站不保证质量和数量令人满意,可能有诸多瑕疵,付费之前,请仔细阅读内容确认后进行付费下载。
- 网站客服QQ:403074932
机械原理大作业课程名称:机械原理设计题目:连杆机构运动分析院系:能源学院班级:设计者:学号:指导教师:设计时间:\n5,源代码’RRI级机构运动分析的源代码PublicClassRR'定义输入字段PublicrxAAsSinglePublicryAAsSinglePublicvxAAsSinglePublicvyAAsSinglePublicaxAAsSinglePublicayAAsSinglePublicphiiAsSinglePublicomegaiAsSinglePublicalphaiAsSinglePublicliAsSingle'定义输出参数Privatesgl_rxBAsSinglePrivatesgl_ryBAsSinglePrivatesgl_vxBAsSinglePrivatesgl_vyBAsSinglePrivatesgl_axBAsSinglePrivatesgl_ayBAsSingle'实例化类并初始化输入字段PublicSubNew(ByValradiusVector_xAAsSingle,ByValradiusVector_yAAsSingle,ByValvelocity_xAAsSingle,ByValvelocity_yAAsSingle,ByValacceleration_xAAsSingle,ByValacceleration_yAAsSingle,ByValphi_iAsSingle,ByValomega_iAsSingle,ByValalpha_iAsSingle,ByVallength_iAsSingle)rxA=radiusVector_xAryA=radiusVector_yAvxA=velocity_xAvyA=velocity_yAaxA=acceleration_xAayA=acceleration_yAphii=phi_iomegai=omega_ialphai=alpha_i\nli=length_iEndSub'定义输出属性PublicReadOnlyPropertyrxBAsSingleGetReturnsgl_rxBEndGetEndPropertyPublicReadOnlyPropertyryBAsSingleGetReturnsgl_ryBEndGetEndPropertyPublicReadOnlyPropertyvxBAsSingleGetReturnsgl_vxBEndGetEndPropertyPublicReadOnlyPropertyvyBAsSingleGetReturnsgl_vyBEndGetEndPropertyPublicReadOnlyPropertyaxBAsSingleGetReturnsgl_axBEndGetEndPropertyPublicReadOnlyPropertyayBAsSingleGetReturnsgl_ayBEndGetEndProperty'计算输出参数PublicSubCalculate()sgl_rxB=rxA+li*Math.Cos(phii)sgl_ryB=ryA+li*Math.Sin(phii)sgl_vxB=vxA-omegai*li*Math.Sin(phii)sgl_vyB=vyA+omegai*li*Math.Cos(phii)sgl_axB=axA-omegai*omegai*li*Math.Cos(phii)-alphai*li*_Math.Sin(phii)\nsgl_ayB=ayA-omegai*omegai*li*Math.Sin(phii)+alphai*li*_Math.Cos(phii)EndSubEndClass’RPRII级基本组运动分析的源代码PublicClassRPR'定义杆组模式枚举类型PublicEnumModeAsIntegerClockWise=1AntiClockWise=-1EndEnum'定义输入字段PublicrxBAsSinglePublicryBAsSinglePublicvxBAsSinglePublicvyBAsSinglePublicaxBAsSinglePublicayBAsSinglePublicrxDAsSinglePublicryDAsSinglePublicvxDAsSinglePublicvyDAsSinglePublicaxDAsSinglePublicayDAsSinglePublicliAsSinglePublicljAsSinglePubliclkAsSinglePublicMAsMode'定义输出参数Privatesgl_rxCAsSinglePrivatesgl_ryCAsSinglePrivatesgl_vxCAsSinglePrivatesgl_vyCAsSinglePrivatesgl_axCAsSinglePrivatesgl_ayCAsSinglePrivatesgl_rxEAsSinglePrivatesgl_ryEAsSinglePrivatesgl_vxEAsSingle\nPrivatesgl_vyEAsSinglePrivatesgl_axEAsSinglePrivatesgl_ayEAsSinglePrivatesgl_phijAsDoublePrivatesgl_omegajAsDoublePrivatesgl_alphajAsDouble'实例化类并初始化输入字段PublicSubNew(ByValradiusVector_xBAsSingle,ByValradiusVector_yBAsSingle,ByValvelocity_xBAsSingle,ByValvelocity_yBAsSingle,ByValacceleration_xBAsSingle,ByValacceleration_yBAsSingle,ByValradiusVector_xDAsSingle,ByValradiusVector_yDAsSingle,ByValvelocity_xDAsSingle,ByValvelocity_yDAsSingle,ByValacceleration_xDAsSingle,ByValacceleration_yDAsSingle,ByVallength_iAsSingle,ByVallength_jAsSingle,ByVallength_kAsSingle,ByValmodeAsMode)rxB=radiusVector_xBryB=radiusVector_yBvxB=velocity_xBvyB=velocity_yBaxB=acceleration_xBayB=acceleration_yBrxD=radiusVector_xDryD=radiusVector_yDvxD=velocity_xDvyD=velocity_yDaxD=acceleration_xDayD=acceleration_yDli=length_ilj=length_jlk=length_kM=modeEndSub'定义输出属性PublicReadOnlyPropertyrxCAsSingleGetReturnsgl_rxCEndGetEndPropertyPublicReadOnlyPropertyryCAsSingleGetReturnsgl_ryCEndGet\nEndPropertyPublicReadOnlyPropertyvxCAsSingleGetReturnsgl_vxCEndGetEndPropertyPublicReadOnlyPropertyvyCAsSingleGetReturnsgl_vyCEndGetEndPropertyPublicReadOnlyPropertyaxCAsSingleGetReturnsgl_axCEndGetEndPropertyPublicReadOnlyPropertyayCAsSingleGetReturnsgl_ayCEndGetEndPropertyPublicReadOnlyPropertyrxEAsSingleGetReturnsgl_rxEEndGetEndPropertyPublicReadOnlyPropertyryEAsSingleGetReturnsgl_ryEEndGetEndPropertyPublicReadOnlyPropertyvxEAsSingleGetReturnsgl_vxEEndGetEndPropertyPublicReadOnlyPropertyvyEAsSingleGetReturnsgl_vyEEndGetEndPropertyPublicReadOnlyPropertyaxEAsSingleGetReturnsgl_axE\nEndGetEndPropertyPublicReadOnlyPropertyayEAsSingleGetReturnsgl_ayEEndGetEndPropertyPublicReadOnlyPropertyphijAsSingleGetReturnsgl_phijEndGetEndPropertyPublicReadOnlyPropertyomegajAsSingleGetReturnsgl_omegajEndGetEndPropertyPublicReadOnlyPropertyalphajAsSingleGetReturnsgl_alphajEndGetEndProperty'计算输出参数PublicSubCalculate()DimphiiAsDoubleDimphikAsDoubleDimsAsDoubleDimvAsDoubleDimaAsDouble'计算phijDimkDBAsDoubleDimphiDBAsDoubleDimphiAsDoubleIfrxB<>rxDThenkDB=(ryB-ryD)/(rxB-rxD)IfrxB>rxDThenphiDB=Math.Atan(kDB)ElsephiDB=Math.Atan(kDB)+Math.PIEndIfElseIfryB>ryDThenphiDB=Math.PI/2Else\nphiDB=3*Math.PI/2EndIfEndIfphi=Math.Asin((li+lk)/Math.Sqrt((rxB-rxD)*(rxB-rxD)+(ryB-ryD)*_(ryB-ryD)))sgl_phij=phiDB+M*phiIfsgl_phij<0Thensgl_phij+=2*Math.PIEndIf'计算sIfli=0Andlk=0Thens=Math.Sqrt((rxB-rxD)*(rxB-rxD)+(ryB-ryD)*(ryB-ryD))Elses=(li+lk)/Math.Tan(phi)EndIf'计算phii,phikphii=sgl_phij+M*Math.PI/2phik=sgl_phij-M*Math.PI/2'计算rCsgl_rxC=rxB+li*Math.Cos(phii)sgl_ryC=ryB+li*Math.Sin(phii)'计算rEsgl_rxE=rxC+(lj-s)*Math.Cos(sgl_phij)sgl_ryE=ryC+(lj-s)*Math.Sin(sgl_phij)'计算omegajDimG4AsDouble=(rxB-rxD)*Math.Cos(sgl_phij)+(ryB-ryD)*_Math.Sin(sgl_phij)sgl_omegaj=((vyB-vyD)*Math.Cos(sgl_phij)-(vxB-vxD)*_Math.Sin(sgl_phij))/G4'计算vv=((vxB-vxD)*(rxB-rxD)+(vyB-vyD)*(ryB-ryD))/G4'计算vCsgl_vxC=vxB-sgl_omegaj*Math.Sin(phii)sgl_vyC=vyB+sgl_omegaj*Math.Cos(phii)'计算alphajDimG5AsDouble=axB-ayD+sgl_omegaj*sgl_omegaj*(rxB-rxD)+2*v*_sgl_omegaj*Math.Sin(sgl_phij)DimG6AsDouble=ayB-ayD+sgl_omegaj*sgl_omegaj*(ryB-ryD)-2*v*_sgl_omegaj*Math.Cos(sgl_phij)sgl_alphaj=(G6*Math.Cos(sgl_phij)-G5*Math.Sin(sgl_phij))/G4'计算sa=(G5*(rxB-rxD)+G6*(ryB-ryD))/G4'计算vCsgl_axC=axB-sgl_alphaj*Math.Sin(phii)-sgl_omegaj*sgl_omegaj*_\nMath.Cos(phii)sgl_ayC=ayB+sgl_alphaj*Math.Cos(phii)-sgl_omegaj*sgl_omegaj*_Math.Sin(phii)EndSubEndClass’RRPII级基本组运动分析的源代码PublicClassRRP'定义杆组模式枚举类型PublicEnumModeAsIntegerClockWise=1AntiClockWise=-1EndEnum'定义输入字段PublicrxBAsSinglePublicryBAsSinglePublicvxBAsSinglePublicvyBAsSinglePublicaxBAsSinglePublicayBAsSinglePublicrxKAsSinglePublicryKAsSinglePublicvxKAsSinglePublicvyKAsSinglePublicaxKAsSinglePublicayKAsSinglePublicphijAsSinglePublicomegajAsSinglePublicalphajAsSinglePublicliAsSinglePublicljAsSinglePublicMAsMode'定义输出参数Privatesgl_rxCAsSinglePrivatesgl_ryCAsSinglePrivatesgl_vxCAsSinglePrivatesgl_vyCAsSinglePrivatesgl_axCAsSinglePrivatesgl_ayCAsSinglePrivatesgl_rxDAsSingle\nPrivatesgl_ryDAsSinglePrivatesgl_vxDAsSinglePrivatesgl_vyDAsSinglePrivatesgl_axDAsSinglePrivatesgl_ayDAsSinglePrivatesgl_phiiAsDoublePrivatesgl_omegaiAsDoublePrivatesgl_alphaiAsDouble'实例化类并初始化输入字段PublicSubNew(ByValradiusVector_xBAsSingle,ByValradiusVector_yBAsSingle,ByValvelocity_xBAsSingle,ByValvelocity_yBAsSingle,ByValacceleration_xBAsSingle,ByValacceleration_yBAsSingle,ByValradiusVector_xKAsSingle,ByValradiusVector_yKAsSingle,ByValvelocity_xKAsSingle,ByValvelocity_yKAsSingle,ByValacceleration_xKAsSingle,ByValacceleration_yKAsSingle,ByValphi_jAsSingle,ByValomega_jAsSingle,ByValalpha_jAsSingle,ByVallength_iAsSingle,ByVallength_jAsSingle,ByValmodeAsMode)rxB=radiusVector_xBryB=radiusVector_yBvxB=velocity_xBvyB=velocity_yBaxB=acceleration_xBayB=acceleration_yBrxK=radiusVector_xKryK=radiusVector_yKvxK=velocity_xKvyK=velocity_yKaxK=acceleration_xKayK=acceleration_yKphij=phi_jomegaj=omega_jalphaj=alpha_jli=length_ilj=length_jM=modeEndSub'定义输出属性PublicReadOnlyPropertyrxCAsSingleGetReturnsgl_rxC\nEndGetEndPropertyPublicReadOnlyPropertyryCAsSingleGetReturnsgl_ryCEndGetEndPropertyPublicReadOnlyPropertyvxCAsSingleGetReturnsgl_vxCEndGetEndPropertyPublicReadOnlyPropertyvyCAsSingleGetReturnsgl_vyCEndGetEndPropertyPublicReadOnlyPropertyaxCAsSingleGetReturnsgl_axCEndGetEndPropertyPublicReadOnlyPropertyayCAsSingleGetReturnsgl_ayCEndGetEndPropertyPublicReadOnlyPropertyrxDAsSingleGetReturnsgl_rxDEndGetEndPropertyPublicReadOnlyPropertyryDAsSingleGetReturnsgl_ryDEndGetEndPropertyPublicReadOnlyPropertyvxDAsSingleGetReturnsgl_vxDEndGetEndPropertyPublicReadOnlyPropertyvyDAsSingleGet\nReturnsgl_vyDEndGetEndPropertyPublicReadOnlyPropertyaxDAsSingleGetReturnsgl_axDEndGetEndPropertyPublicReadOnlyPropertyayDAsSingleGetReturnsgl_ayDEndGetEndPropertyPublicReadOnlyPropertyphiiAsSingleGetReturnsgl_phiiEndGetEndPropertyPublicReadOnlyPropertyomegaiAsSingleGetReturnsgl_omegaiEndGetEndPropertyPublicReadOnlyPropertyalphaiAsSingleGetReturnsgl_alphaiEndGetEndProperty'计算输出参数PublicSubCalculate()'计算phiiDimhAsDoubleIfMath.Cos(phij)=0Thenh=rxB-rxKElseh=Math.Abs(Math.Cos(phij))*(ryK-ryB-Math.Tan(phij)*(rxK-rxB))EndIfIfM=Mode.ClockWiseThensgl_phii=Math.Asin((h+lj)/li)+phijElsesgl_phii=Math.PI-Math.Asin((h+lj)/li)+phijEndIf'计算rC\nsgl_rxC=rxB+li*Math.Cos(sgl_phii)sgl_ryC=ryB+li*Math.Sin(sgl_phii)'计算rDDimsAsDouble=(sgl_rxC-rxK+lj*Math.Sin(phij))/Math.Cos(phij)sgl_rxD=rxK+s*Math.Cos(phij)sgl_ryD=ryK+s*Math.Sin(phij)'计算omegaiDimQ1AsDouble=vxK-vxB-omegaj*(s*Math.Sin(phij)+lj*_Math.Cos(phij))DimQ2AsDouble=vyK-vyB+omegaj*(s*Math.Cos(phij)-lj*_Math.Sin(phij))DimQ3AsDouble=li*Math.Sin(sgl_phii)*Math.Sin(phij)+li*_Math.Cos(sgl_phii)*Math.Cos(phij)sgl_omegai=(Q2*Math.Cos(phij)-Q1*Math.Sin(phij))/Q3'计算vCsgl_vxC=vxB-sgl_omegai*li*Math.Sin(sgl_phii)sgl_vyC=vyB+sgl_omegai*li*Math.Cos(sgl_phii)'计算vDDimvAsDouble=-(Q1*li*Math.Cos(sgl_phii)+Q2*li*_Math.Sin(sgl_phii))/Q3sgl_vxD=vxK+v*Math.Cos(phij)-s*omegaj*Math.Sin(phij)sgl_vyD=vyK+v*Math.Sin(phij)+s*omegaj*Math.Cos(phij)'计算alphaiDimQ4AsDouble=axK-axB+sgl_omegai*sgl_omegai*li*_Math.Cos(sgl_phii)-alphaj*(s*Math.Sin(phij)+lj*Math.Cos(phij))-omegaj*_omegaj*(s*Math.Cos(phij)-lj*Math.Sin(phij))-2*v*omegaj*Math.Sin(phij)DimQ5AsDouble=ayK-ayB+sgl_omegai*sgl_omegai*li*_Math.Sin(sgl_phii)+alphaj*(s*Math.Cos(phij)-lj*Math.Sin(phij))-omegaj*_omegaj*(s*Math.Sin(phij)+lj*Math.Cos(phij))+2*v*omegaj*Math.Cos(phij)sgl_alphai=(Q5*Math.Cos(phij)-Q4*Math.Sin(phij))/Q3'计算aCsgl_axC=axB-sgl_alphai*li*Math.Sin(sgl_phii)-sgl_omegai*sgl_omegai_*li*Math.Cos(sgl_phii)sgl_ayC=ayB+sgl_alphai*li*Math.Cos(sgl_phii)-sgl_omegai*sgl_omegai_*li*Math.Sin(sgl_phii)'计算aDDimaAsDouble=-(Q4*li*Math.Cos(sgl_phii)+Q5*li*_Math.Sin(sgl_phii))/Q3sgl_axD=axK+a*Math.Cos(phij)-s*alphaj*Math.Sin(phij)-s*omegaj*_omegaj*Math.Cos(phij)-2*v*omegaj*Math.Sin(phij)sgl_ayD=ayK+a*Math.Sin(phij)+s*alphaj*Math.Cos(phij)-s*omegaj*_\nomegaj*Math.Sin(phij)+2*v*omegaj*Math.Cos(phij)EndSubEndClass’整个连杆机构运动分析的源代码PublicClassLinkagePublicConstnAsInteger=999'定义各点坐标字段PublicrB(n)AsPointFPublicrD(n)AsPointFPublicrF(n)AsPointFPublicrH(n)AsPointF'定义G点运动状态字段PublicrxG(n)AsSinglePublicvxG(n)AsSinglePublicaxG(n)AsSingle'计算整个机构的运动状态PrivateSubLinkage_Load(senderAsObject,eAsEventArgs)HandlesMyBase.Load'定义并初始化已知参数Dimomega1AsSingle=10DimlABAsSingle=170DimlCDAsSingle=200DimlEFAsSingle=650DimlFGAsSingle=500DimvxB(n)AsSingleDimvyB(n)AsSingleDimaxB(n)AsSingleDimayB(n)AsSingleDimvxD(n)AsSingleDimvyD(n)AsSingleDimaxD(n)AsSingleDimayD(n)AsSingleDimvxF(n)AsSingleDimvyF(n)AsSingleDimaxF(n)AsSingleDimayF(n)AsSingle\nDimphiCD(n)AsSingleDimomegaCD(n)AsSingleDimalphaCD(n)AsSingleDimphiEF(n)AsSingleDimomegaEF(n)AsSingleDimalphaEF(n)AsSingleDimphiABAsSingleDimstepPhiAsSingle=Math.PI*2/1000DimABAsRRDimBBCAsRPRDimCDAsRRDimDDEAsRPRDimEFAsRRDimFGGAsRRP'计算机构运动状态ForiAsInteger=0TonphiAB=i*stepPhi'计算B点的运动状态AB=NewRR(0,0,0,0,0,0,phiAB,10,0,lAB)AB.Calculate()rB(i).X=AB.rxBrB(i).Y=AB.ryBvxB(i)=AB.vxBvyB(i)=AB.vyBaxB(i)=AB.axBayB(i)=AB.ayB'计算H点和CD杆的运动状态BBC=NewRPR(rB(i).X,rB(i).Y,vxB(i),vyB(i),axB(i),ayB(i),-110,0,0,0,0,0,0,300,0,1)BBC.Calculate()rH(i).X=BBC.rxErH(i).Y=BBC.ryEphiCD(i)=BBC.phij+Math.PI/2IfphiCD(i)>2*Math.PIThenphiCD(i)-=2*Math.PIomegaCD(i)=BBC.omegajalphaCD(i)=BBC.alphaj'计算D点的运动状态\nCD=NewRR(-110,0,0,0,0,0,phiCD(i),omegaCD(i),alphaCD(i),lCD)CD.Calculate()rD(i).X=CD.rxBrD(i).Y=CD.ryBvxD(i)=CD.vxBvyD(i)=CD.vyBaxD(i)=CD.axBayD(i)=CD.ayB'计算EF杆的运动状态DDE=NewRPR(rD(i).X,rD(i).Y,vxD(i),vyD(i),axD(i),ayD(i),-110,-320,0,0,0,0,0,lEF,0,1)DDE.Calculate()phiEF(i)=DDE.phijomegaEF(i)=DDE.omegajalphaEF(i)=DDE.alphaj'计算F点的运动状态EF=NewRR(-110,-320,0,0,0,0,phiEF(i),omegaEF(i),alphaEF(i),lEF)EF.Calculate()rF(i).X=EF.rxBrF(i).Y=EF.ryBvxF(i)=EF.vxBvyF(i)=EF.vyBaxF(i)=EF.axBayF(i)=EF.ayB'计算G点的运动状态FGG=NewRRP(rF(i).X,rF(i).Y,vxF(i),vyF(i),axF(i),ayF(i),0,380,0,0,0,0,0,0,0,500,0,1)FGG.Calculate()rxG(i)=FGG.rxCvxG(i)=FGG.vxCaxG(i)=FGG.axCNextEndSubPrivateSubbtnAnimation_Click(senderAsObject,eAsEventArgs)Handles_btnAnimation.ClickDimLinkageAnimationAsNewAnimationLinkageAnimation.Show()EndSubPrivateSubbtnDisplacement_Click(senderAsObject,eAsEventArgs)Handles_\nbtnDisplacement.ClickDimLinkageImageAsNewImageLinkageImage.Show()EndSubEndClass’机构动画的源代码PublicClassAnimationConstnAsInteger=Linkage.n'定义绘图字段PrivaterB(n)AsPointFPrivaterD(n)AsPointFPrivaterF(n)AsPointFPrivaterG(n)AsPointFPrivaterH(n)AsPointF'定义绘图类PrivateGraph1AsGraphicsPrivatepen1AsNewPen(Color.Black,2)PrivatekAsSingle=2PrivateiAsIntegerPrivateIsStartAsBooleanPrivateSubAnimation_Load(senderAsObject,eAsEventArgs)HandlesMyBase.LoadGraph1=PictureBox1.CreateGraphics()'坐标变换Graph1.TranslateTransform(400,250)Graph1.ScaleTransform(1,-1)'初始化绘图类ForiAsInteger=0TonrB(i).X=Linkage.rB(i).X/krB(i).Y=Linkage.rB(i).Y/krD(i).X=Linkage.rD(i).X/krD(i).Y=Linkage.rD(i).Y/krF(i).X=Linkage.rF(i).X/krF(i).Y=Linkage.rF(i).Y/krG(i).X=Linkage.rxG(i)/krG(i).Y=380/krH(i).X=Linkage.rH(i).X/krH(i).Y=Linkage.rH(i).Y/kNextEndSubPrivateSubTimer1_Tick(senderAsObject,eAsEventArgs)HandlesTimer1.TickIfIsStartThenGraph1.Clear(Color.White)'绘制机构\nGraph1.DrawLine(pen1,0,0,rB(i).X,rB(i).Y)Graph1.DrawLine(pen1,-110/k,0,rH(i).X,rH(i).Y)Graph1.DrawLine(pen1,-110/k,0,rD(i).X,rD(i).Y)Graph1.DrawLine(pen1,-110/k,-320/k,rF(i).X,rF(i).Y)Graph1.DrawLine(pen1,rF(i),rG(i))'循环i+=10Ifi>=1000Theni-=1000EndIfEndIfEndSubPrivateSubbtnStart_Click(senderAsObject,eAsEventArgs)HandlesbtnStart.ClickIsStart=TrueEndSubPrivateSubbtnSuspend_Click(senderAsObject,eAsEventArgs)HandlesbtnSuspend.ClickIsStart=FalseEndSubEndClass’位移、速度、加速度线图的源代码PublicClassImageConstnAsInteger=Linkage.n'定义坐标点Privater(n)AsPointFPrivatev(n)AsPointFPrivatea(n)AsPointF'定义绘图类PrivateGraphAsGraphicsPrivatepenCoordinateAsNewPen(Color.Black,3)PrivatepenNetAsNewPen(Color.Gray)PrivatepenCurveAsNewPen(Color.Black,2)PrivatefontCoordinateAsNewFont("timesnewroman",8)PrivatenetWidthAsSinglePrivatenetHeightAsSinglePrivateky1AsSinglePrivateky2AsSinglePrivateky3AsSinglePrivateSubImage_Load(senderAsObject,eAsEventArgs)HandlesMyBase.Load\nDimkxAsSingle=(n+1)/(PictureBox1.Width-60)netWidth=(PictureBox1.Width-60)/12netHeight=50ky1=2ky2=50ky3=150'计算坐标点ForiAsInteger=0Tonr(i).X=i/kxr(i).Y=Linkage.rxG(i)/ky1v(i).X=i/kxv(i).Y=Linkage.vxG(i)/ky2a(i).X=i/kxa(i).Y=Linkage.axG(i)/ky3Next'设置绘图类Graph=PictureBox1.CreateGraphics()penNet.DashStyle=Drawing2D.DashStyle.DashDotpenCoordinate.EndCap=Drawing2D.LineCap.ArrowAnchornetWidth=(PictureBox1.Width-60)/12EndSubPrivateSubbtnRadius_Click(senderAsObject,eAsEventArgs)Handles_btnRadius.ClickGraph.Clear(Color.White)'绘制网格ForiAsInteger=0To12Graph.DrawLine(penNet,40+i*netWidth,0,40+i*netWidth,_PictureBox1.Height-40)Graph.DrawString(i*30,fontCoordinate,Brushes.Black,30+i*netWidth,_PictureBox1.Height-35)Graph.DrawLine(penNet,40,PictureBox1.Height-40-i*netHeight,_PictureBox1.Width-20,PictureBox1.Height-40-i*netHeight)Graph.DrawString(250+i*netHeight*ky1,fontCoordinate,Brushes.Black,_16,PictureBox1.Height-44-i*netHeight)Next'绘制坐标轴Graph.DrawLine(penCoordinate,40,PictureBox1.Height-40,PictureBox1.Width-_20,PictureBox1.Height-40)Graph.DrawLine(penCoordinate,40,PictureBox1.Height-40,40,20)'坐标变换Graph.TranslateTransform(40,PictureBox1.Height-40)Graph.ScaleTransform(1,-1)\n'绘制曲线Graph.DrawCurve(penCurve,r)'坐标复原Graph.TranslateTransform(-40,PictureBox1.Height-40)Graph.ScaleTransform(1,-1)EndSubPrivateSubbtnVecoticy_Click(senderAsObject,eAsEventArgs)Handles_btnVecoticy.ClickGraph.Clear(Color.White)'绘制网格ForiAsInteger=0To12Graph.DrawLine(penNet,40+i*netWidth,0,40+i*netWidth,_PictureBox1.Height)Graph.DrawString(i*30,fontCoordinate,Brushes.Black,30+i*netWidth,_PictureBox1.Height-245)Graph.DrawLine(penNet,40,PictureBox1.Height-250-(i-6)*netHeight,_PictureBox1.Width-20,PictureBox1.Height-250-(i-6)*netHeight)Ifi=6ThenContinueForGraph.DrawString((i-6)*netHeight*ky2,fontCoordinate,Brushes.Black,_10,PictureBox1.Height-255-(i-6)*netHeight)Next'绘制坐标轴Graph.DrawLine(penCoordinate,40,PictureBox1.Height-250,PictureBox1.Width-_20,PictureBox1.Height-250)Graph.DrawLine(penCoordinate,40,PictureBox1.Height-20,40,20)'坐标变换Graph.TranslateTransform(40,PictureBox1.Height-250)Graph.ScaleTransform(1,-1)'绘制曲线Graph.DrawCurve(penCurve,v)'坐标复原Graph.TranslateTransform(-40,PictureBox1.Height-250)Graph.ScaleTransform(1,-1)EndSubPrivateSubbtnAcceleration_Click(senderAsObject,eAsEventArgs)Handles_btnAcceleration.ClickGraph.Clear(Color.White)'绘制网格ForiAsInteger=0To12Graph.DrawLine(penNet,40+i*netWidth,0,40+i*netWidth,_\nPictureBox1.Height)Graph.DrawString(i*30,fontCoordinate,Brushes.Black,30+i*netWidth,_PictureBox1.Height-245)Graph.DrawLine(penNet,40,PictureBox1.Height-250-(i-6)*netHeight,_PictureBox1.Width-20,PictureBox1.Height-250-(i-6)*netHeight)Ifi=6ThenContinueForGraph.DrawString((i-6)*netHeight*ky3,fontCoordinate,Brushes.Black,_4,PictureBox1.Height-255-(i-6)*netHeight)Next'绘制坐标轴Graph.DrawLine(penCoordinate,40,PictureBox1.Height-250,PictureBox1.Width-_20,PictureBox1.Height-250)Graph.DrawLine(penCoordinate,40,PictureBox1.Height-20,40,20)'坐标变换Graph.TranslateTransform(40,PictureBox1.Height-250)Graph.ScaleTransform(1,-1)'绘制曲线Graph.DrawCurve(penCurve,a)'坐标复原Graph.TranslateTransform(-40,PictureBox1.Height-250)Graph.ScaleTransform(1,-1)EndSubEndClass6,计算结果\n\n