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

正文內(nèi)容

人教小學(xué)信息第二冊圖形變換課件-資料下載頁

2024-11-15 00:14本頁面

【導(dǎo)讀】圖形變換是計(jì)算機(jī)圖形學(xué)的基礎(chǔ)內(nèi)容。三維圖形基本變換、復(fù)合(組合)變換;提供了用矩陣運(yùn)算把二維三維甚至高維??梢员硎緹o窮遠(yuǎn)的點(diǎn)。–坐標(biāo)系變化后圖形在新坐標(biāo)系中的新值。標(biāo),但圖形的拓?fù)潢P(guān)系不變。向和Y方向的平移量。Sx、Sy分別表示比例因子。個分量的向量的方法稱為齊次坐標(biāo)表示。一不為0的比例系數(shù)。即齊次坐標(biāo)為,其中h≠0。齊次坐標(biāo)的概念可以推廣到n維空間的向量。通常當(dāng)h=1時,稱為規(guī)格化齊次坐標(biāo)。–可方便地用變換矩陣實(shí)現(xiàn)對圖形的變換;–齊次坐標(biāo)表示法可以表達(dá)無窮遠(yuǎn)點(diǎn)。是對圖形進(jìn)行縮放、旋轉(zhuǎn)、對稱、錯切等變換。只改變圖形的位置,不改變圖形的大

  

【正文】 n glPushMatrix()。 glRotatef ((GLfloat) ang2, , , )。 glRotatef (, , , )。 // rotate it upright glutWireSphere(, 20, 16)。 // glut routine glPopMatrix()。 OpenGL Implementation (con.) // draw smaller pla glRotatef ((GLfloat) ang1, , , )。 glTranslatef (, , )。 glRotatef ((GLfloat) ang3, , , )。 glRotatef (, , , )。 // rotate it upright glutWireSphere(, 10, 8)。 // glut routine glPopMatrix()。 glutSwapBuffers()。 } Result Let’s Examine Some Examples Question 2: Draw a simple articulated robot arm with three segments. The arms should be connected with pivot points as the shoulder, elbow, or other joints. (the three segments have same length, saying 2 units) Pivot points Example2 Red segment: 1. Translates unit 1 to its pivot point. M1 = T (1, 0, 0) 2. Rotates around its pivot point. M2 = Ro (?) 3. Translates –1 unit back to origin. M3 = T (1, 0, 0) M = M3 M2 M1 OpenGL Implementation void display(void) { glClear(GL_COLOR_BUFFER_BIT)。 glPushMatrix()。 // draw shoulder (red) glTranslatef (, , )。 glRotatef (shoulder, , , )。 glTranslatef (, , )。 glPushMatrix()。 glScalef (, , )。 glColor3f (, , )。 glutSolidCube (1)。 // glut routine glPopMatrix()。 Example2 Green segment: 1. Translates unit 1 to its pivot point. M1 = T (1, 0, 0) 2. Rotates around its pivot point. M2 = Ro (?) 3. Translates 1 unit to the edge of the Red segment. M3 = T (1, 0, 0) M = M3 M2 M1 OpenGL Implementation void display(void) { …… // draw elbow glTranslatef (, , )。 glRotatef (elbow, , , )。 glTranslatef (, , )。 glPushMatrix()。 glScalef (, , )。 glColor3f (, , )。 glutSolidCube(1)。 // glut routine glPopMatrix()。 Example2 Yellow segment: 1. Translates unit 1 to its pivot point. M1 = T (1, 0, 0) 2. Rotates around its pivot point. M2 = Ro (?) 3. Translates 1 unit to the edge of the Green segment. M3 = T (1, 0, 0) M = M3 M2 M1 Result Problems ? Modify the Sailboat program, utilizing matrix multiplication, to do the following: ? Translate it to the middle of the window ? Scale it to half size ? Make it spin about the : ? X axis – left mouse button ? Y axis – middle mouse button ? Z axis right mouse button Problems ? Modify the Teapot program, utilizing rotatescaletranslate, to do the following: ? Translate it to the bottom of the window ? Scale it to 1/3 size ? Rotate it 120 degrees about the x axis Remember ? Always keep tracking your current position. Remember where you are, and go back to where you were. ? Matrix multiplication is not mutative, the transformation order is very important. ? In OpenGL, the transformation specified most recently is the one applied first. glu quadric Primitives ? Quadric primitives – gluCylinder – gluDisk – gluPartialDisk – gluSphere ? Displays at 0, 0, 0 – Translate to where you want it gluNewQuadric Create a new Quadric Object gluNewQuadric ()。 gluCylinder Draw a cylinder gluCylinder ( quad, base, top, height, slices, stacks )。 quad – specifies the quadrics object (create with gluNewQuadric) base – specifies the radius of the cylinder at z=0 top – specifies the radius of the cylinder at z=height height specifies the height of the cylinder slices – specifies the number of subdivisions around the z axis stacks specifies the number of subdivisions along the z axis gluDisk Draw a disk gluDisk ( quad, inner, outer, slices, loops )。 quad – specifies the quadrics object (create with gluNewQuadric) inner – specifies the inner radius of the disk (may be 0) outer – specifies the outer radius of the disk slices – specifies the number of subdivisions around the z axis loops specifies the number of concentric rings about the origin into which the disk is subdivided gluPartialDisk Draw an arc of a disk gluPartialDisk ( quad, inner, outer, slices, loops, start, sweep )。 quad – specifies the quadrics object (create with gluNewQuadric) inner – specifies the inner radius of the disk (may be 0) outer – specifies the inner radius of the disk slices – specifies the number of subdivisions around the z axis loops specifies the number of concentric rings about the origin into which the disk is subdivided start – specifies the starting angle, in degrees, of the disk portion sweep – specifies the sweep angle, in degrees, of the disk portion gluSphere Draw a sphere gluSphere ( quad, radius, slices, stacks )。 quad – specifies the quadrics object (create with gluNewQuadric) radius – specifies the radius of the sphere slices – specifies the number of subdivisions around the z axis stacks specifies the number of subdivisions along the z axis
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1