freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

高檔數(shù)控系統(tǒng)的螺旋線插補算法設計畢業(yè)論文-資料下載頁

2025-08-17 00:27本頁面

【導讀】本科畢業(yè)設計(論文)。班級:K數(shù)控101學號:240101222. 本課題主要是研究基于數(shù)據(jù)采樣法進行螺旋曲線的插補研究,要求能夠更。本課題采用vc環(huán)境下的OpenGL軟件的調(diào)試,并實現(xiàn)。3)完成螺旋曲線以及螺旋曲線的插補的仿真以及測試

  

【正文】 x=x0。 y=y0。 deltaX = deltaL*y0/R。 deltaY = deltaL*x0/R。 MoveToPosition(x,y,z,i)。 //移動電機至目標括位置 while(yx) //此段 X值變化比快 { deltaX = deltaL/R*(y+*deltaY)。 //優(yōu)先改變 deltaY = y+sqrt(R*R(x+deltaX)*(x+deltaX))。 x+=deltaX。 y+=deltaY。 z+=DTz。 MoveToPosition(x,y,z,i)。 //移動電機至目標括位置 if(z = height) break。 } if(z = height) break。 南京工程學院康尼學院本科畢業(yè)設計(論文) 26 while(x=y amp。amp。 x radius amp。amp。 y ) //此段 Y值變化快 { deltaY = deltaL/R*(x+*deltaX)。 //優(yōu)先改變 Y deltaX = x+sqrt(R*R(y+deltaY)*(y+deltaY))。 y+=deltaY。 x+=deltaX。 z+=DTz。 if(x radius amp。amp。 y ) MoveToPosition(x,y,z,i)。 //移動電機至目標括位置 else MoveToPosition(R,z,i)。 if(z = height) break。 } if(z = height) break。 } glEnd()。 } // 移動至目標括位置 void ModelSpiralLine::MoveToPosition(float x, float y,float z,int i) { float tem。 switch(i) { case 0://如果在第一象限 break。 case 1:// tem = x。 x = y。 y = tem。 break。 case 2://如果在第三象限 x = x。 y = y。 break。 case 3://如果在第二象限 tem = x。 x = y。 y = tem。 南京工程學院康尼學院本科畢業(yè)設計(論文) 27 break。 default: break。 } glVertex3f(x,y,z)。 } // 計算偏差 float ModelSpiralLine::CalError(float x, float y) { return (x)*(x)+(y)*(y)radius*radius。 } // 繪制 void ModelSpiralLine::Draw(void) { if(!isValid) return。 glPushMatrix()。 glRotatef(80,1,0,0)。 glTranslatef(0,0,height/)。 DrawSpiralLine()。 glPopMatrix()。 } // 給參數(shù)賦值 void ModelSpiralLine::SetPara(float r, float h, float f,float ts,float p) { if(f*ts r*) { AfxMessageBox(_T(進 ?給 ?步 ?長 164。太 ?大洙 ?! ?進 ?給 ?步 ?長 164。=F*Ts))。 return。 } radius = r。 height = h。 pitch = p。 F = f。 Ts = ts。 //DTz = pitch/(ceil(PI/(asin(F*Ts/)*2))*4)。/? DTz = pitch/(GetSetpNum()*4)。 南京工程學院康尼學院本科畢業(yè)設計(論文) 28 } // 設置顏色 void ModelSpiralLine::SetColor(float r, float g, float b) { cr = r。 cg = g。 cb = b。 } int ModelSpiralLine::GetSetpNum(void) { float deltaL = F*Ts。 float deltaX,deltaY。 float R = radius。 float x,y,x0=,y0=R。 float z=。 x=x0。 y=y0。 deltaX = deltaL*y0/R。 deltaY = deltaL*x0/R。 int ret = 0。 while(yx) { deltaX = deltaL/R*(y+*deltaY)。 deltaY = y+sqrt(R*R(x+deltaX)*(x+deltaX))。 x+=deltaX。 y+=deltaY。 z+=DTz。 ret++。 } while(x=y amp。amp。 x radius amp。amp。 y ) { deltaY = deltaL/R*(x+*deltaX)。 deltaX = x+sqrt(R*R(y+deltaY)*(y+deltaY))。 y+=deltaY。 x+=deltaX。 z+=DTz。 ret++。 } return ret。 南京工程學院康尼學院本科畢業(yè)設計(論文) 29 } include include include CVector3::CVector3(void) { x = y = z = 0。 } CVector3::~CVector3(void) { } CVector3::CVector3(float x,float y, float z) { thisx = x。 thisy = y。 thisz = z。 } // 賦值 void CVector3::Set(float x, float y, float z) { thisx = x。 thisy = y。 thisz = z。 } // 計算到一個點的距離 float CVector3::GetDistance(const CVector3 amp。 vertex) { return sqrtf(pow(x ,2)+ pow(y ,2)+ pow(z ,2))。 } void CVector3::operator=(const CVector3 amp。 vertex) 南京工程學院康尼學院本科畢業(yè)設計(論文) 30 { x = 。 y = 。 z = 。 } CVector3 CVector3::operator(const CVector3 amp。 vertex) { return CVector3(, , )。 } CVector3 CVector3::operator+(const CVector3 amp。 vertex) { return CVector3(x+, y+, z+)。 } bool CVector3::operator!=(const CVector3 amp。 vertex) { return ()||()||()。 } // 計算向量的積 CVector3 CVector3::CalVectorCrossProduct(CVector3 amp。 vector) { CVector3 ans(0,0,0)。 if(!IsVector() || !()) return ans。 = y* z*。//GL坐標系滿足相當于右手旋 y轉(zhuǎn) = z* x*。 = x* y*。 return ans。 } // 計算向量點積 float CVector3::CalVectorDotProduct(CVector3 amp。 vector) { return x* + y* + z*。 } 南京工程學院康尼學院本科畢業(yè)設計(論文) 31 // 判斷向量是否平行 bool CVector3::IsParallel(CVector3 amp。 vector) { return (CalVectorCrossProduct(vector).GetLength() == 0)。 } // 獲取向量的長度 float CVector3::GetLength(void) { return sqrtf(x*x + y*y + z*z)。 } // 計算向量間夾角 float CVector3::CalAngleWith(CVector3 amp。 vector) { if(!IsVector() || !()) return 0。 float cosVal = CalVectorDotProduct(vector)/(GetLength()*())。 if(cosVal ) cosVal = 。 else if(cosVal ) cosVal = 。 float ret = (float)acos(cosVal)*。 return ret。 } // 計算指定向量方向距離為 adistance的點 CVector3 CVector3::CalVertexOnVector(float distance,CVector3 amp。 startVector) { CVector3 ans(0,0,0)。 if(!()) return *this。 if( != 0 amp。amp。 != 0 amp。amp。 != 0) { //已知起點以及方向向量,計算 南京工程學院康尼學院本科畢業(yè)設計(論文) 32 float temp = distance/ //第三控制點 sqrtf((1+(* + *) / (*)))。 if( 0) = x + temp。 else = x temp。 temp = temp*abs()。 //注意要取絕對值 if( 0) = y + temp。 else = y temp。 temp = temp*abs()。 if( 0) = z + temp。 else = z temp。 } else if( == 0 amp。amp。 != 0 amp。amp。 != 0) { = x。 float temp = distance/ sqrtf((1+(*) / (*)))。 if( 0) = y + temp。 else = y temp。 temp = temp*abs()。 if( 0) = z + temp。 else = z temp。 } else if( != 0 amp。amp。 == 0 amp。amp。 != 0) { float temp = distance/ sqrtf((1+(*) / (*)))。 南京工程學院康尼學院本科畢業(yè)設計(論文) 33 if( 0) = x + temp。 else = x temp。 = y。 temp = temp*abs()。 if( 0) = z + temp。 else = z temp。 } else if( != 0 amp。amp。 != 0 amp。amp。 == 0) { float temp = distance/ sqrtf((1+(*) / (*)))。 if( 0) = x + temp。 else = x temp。
點擊復制文檔內(nèi)容
試題試卷相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1