슬라이드 1 - peppermint

슬라이드 1 - peppermint

Ch 3. OpenGL S/W 3.1 OpenGL 3.2 OpenGL 3.3 3.4 3.5 3 3.6 ( ) Illustrator, Painter, 3D Studio M ax OpenGL : 3 S/W 1 3.1 OpenGL

Graphics API : Platform-Independent OpenGL CAD , 3 , (1) OpenGL Silicon Graphics(SGI) GL OpenGL Architecture Review Board (http://www.opengl.org) OpenGL : SGI, DEC, IBM, Apple, Microsoft GL OpenGL 1992 OpenGL 1.0 2002 7 OpenGL 1.4 2D 3D API 2 " "

, (high-level) API OpenGL . PC (Mac OS, OS/2, Windows, Linux ,...) (C/C++, Fortran, Java, Visual Basic,)) . , , , , 2D 3D ,NURBS, , H/W , , , 3 (2) (Stability) )

10 , (Reliability) & Portability) ) OpenGL (Scalability) ) PC (Ease of Use) (Well-documented) OpenGL , 4 (3) Library OpenGL GL GLU

( ) : AUX GLUT GL Library) (OpenGL Main Library) ) : , , gl (prefix) GLU Library) (OpenGL Utility) Library) ) : , : , , , glu AUX Library) (Auxiliary) Library) for Application Interface) (Toolkit) , aux- , GLUT Library) (OpenGL Utility) Toolkit Library) ) , X- , 5 (4) OpenGL < >< >< >

< >: gl, glu, aux glut < >: "< >< >" < >- 2, 3, 4 < >- f, d, s, i, b, ub, us, ui OpenGL , ( ) glBegin (GL_POINTS); gluPerspective (60.0, 1.0, 1.0, 400.0); auxInitWindow ("Example"); glVertex2i (50, 100); - 2 glColor3f (1.0, 0.0, 0.0); - R,G,B 6

(5) OpenGL OpenGL C AUX (Lab. D,E C++ ) Windows Sy) stem Interface : OpenGL 'blue'blue'blue' . #include // gl, aux #include void main( ) { // auxInitDisplayMode (AUX_SINGLE | AUX_RGBA); // auxInitPosition (100, 100, 250, 250); // GL auxInitWindow ("First Example"); // GL

// glClearColor (0.0f, 0.0f, 1.0f, 1.0f); // 'blublu e'blu glClear (CL_COLOR_BUFFER_BIT); // glFlush ( ); // } 7 : CALLBACK , auxMai nLoop() #include #include void CALLBACK my_display( ) { glClearColor(0.0f, 0.0f, 1.0f, 1.0); // 'blublu

e'blu glClear(GL_COLOR_BUFFER_BIT); // glColor3f(0.0f, 1.0f, 0.0f); // 'blugreen'blu glRectf(100.0f, 150.0f, 150.0f, 100.0f); // glFlush(); // } void main() { auxInitDisplayMode(AUX_SINGLE | AUX_RGBA); auxInitPosition (100, 100, 250, 250); auxInitWindow ("First Example"); auxMainLoop(my_display()); // } 8

3.2 OpenGL 200 , , , , (1) , , glBegin( ) glEnd() glVertex*() , glBegin(GL_POLYGON); glVertex2i (20, 100); // V1 glVertex2i (20, 20); // V2 glVertex2i (140, 20); // V3 glVertex2i (140, 100); // V4

glEnd(); 9 glBegin( ) GL_POINT( ), GL_LINE( ), GL_POLYGON( ), GL_TRANGLES ( ), GL_QUADS( ), ) : 3-6 : glPointSize(size), glLineWidth(width) glLineStipple(factor,pattern) glFrontFace(mode) (2) (Transformation Matrix) OpenGL 4 (Viewing) : (viewpoint) ,

(Modeling) : 3 , , (Projection) : 3 2 (Viewport) : 10 OpenGL 4*4 , : glMatrixMode(mode) mode GL_MODELVIEW, GL_PROJECTION glLoadIdentity) (); glLoadMatrix(*m); glPushMatrix(); g lPopMatrix(); , , glTranslate3f(tx, ty) , tz); glScale3f(sx, sy) , sz); glRotate4f

(angle, x, y) , z); 11 (Orthographic Projection) glOrtho(left, right, bottom, top, near, far); // gl gluOrtho2D(left, right, bottom, top); // glu (Perspective Projection) glFrustum(left, right, bottom, top, near, far); // gl gluPerspective(fovy) , aspect, zNear, zFar); // glu (Viewport) : glViewport(x, y) , width, height) 12 (3) 3 (Hidden Surface Removal) 3 2 ( )

3 (Depth Test) : : glEnable(GL_DEPTH_TEST) : glDisable(GL_DEPTH_TEST) Culling : . : glEnable(GL_CULL_FACE), : glDisable(GL_CULL_FACE) 13 (4) Double Buffering : glDrawBuffer(buffer)

'blue'buffer'blue' GL_FRONT, GL_BACK, GL_FRONT_AND_BAC K : SwapBuffers() (5) (Shading) OpenGL : RGB , Alpha : glColor(red, green, blue, alpha) (Shading Model) , Flat Shading : glShadeModel(GL_FLAT), Smooth Shading : glShadeModel(GL_SMOOTH), 14

(6) (Lights) (Materials) (Ambient Light) : (Diffuse Light) : (Specular Light) : OpenGL (Light Source) : glEnable(GL_LIGHT0) , glLight() 3 : glEnable(GL_LIGHTING) glLightModel () 3 (Material) glEnable(GL_COLOR_MATERIAL) glColorMaterial() glMaterial() Diffuse Reflection, Ambient Reflection, Specular Reflection, S hininess, Emission 15

(7) (Texture Mapping) OpenGL (Bitmap) : 0 1 (Pixmap) : glRasterPos2i(x, y) ); // glBitmap(width, height, x0, y) 0, xi, y) i, *data); // glDrawPixels(width, height, format, ty) pe, *pixels); //

glReadPixels(), glPixelStore(), glCopy) Pixels() 16 (Texture Mapping) 3 1D : glTexImage1D(), 2D : glTexImage2D(), (3 2 17 (8) (Blending) (Fog Effect) : , , , ,

OpenGL glEnable(GL_BLEND) , glBlendFunc(source, de stination) (Fog Effect) glFog(pname, param) 18 (9) , , , x y) 2 2 , 3 2 z 2 (Quadric Surface) glu32.lib GLU 2

gluCy) linder(), gluDisk(), gluSphere() gluCy) linder() 0.0 OpenGL 2 (a) gluCylin der (b) gluDisk (c) gluSpher e 19 glMap1f() glEvalCoord1f() .

glMap2f() , glMapGrid2f(), glEvalMesh2 () . NURBS : NURBS(Non-Uniform Rational B-Spline) glMap1f() gluNurbsCurve() . NURBS glMap2f() gluNurbsSurface() . : . 20 3.3 (Vector Graphic) S/W S/W : , , 2D (Illustrator, Corel Draw, Flash)

(1) Vector Graphics , , , , . (Drawing) 3D (Drawing) : ( , , , ) (Filling) : , , (Editing) : , 21 (a) (b)

(c) (2) 2D Adobe Illustrator Adobe EPS(Encapsulated Postscript) Photoshop 2D, 3D S/W Corel Draw Corel , , , , DTP , S/W 22

Macromedia Flash Macromedia (Tweening) , (Morphing) 23 3.4 Raster Graphics S/W Photoshop S/W (1) Raster Graphics :

: : : , (Lay) er) : 24 (b) (c) (a) (2) Procreate Painter Metacreation , , , ,

25 Adobe Photoshop Adobe , , , , Photoshop Paintshop Pro Paintshop Pro Jasc Software , ,

26 3.5 3D Graphics S/W , , animation CAD/CAM. 3 , , , , (1) 3 Graphics S/W , 3 : 3 : 3 : 3 (a) (b)

(c) 27 (2) 3 S/W 3D Studio MAX AutoDesk Kinetix , , , , PC 3D Studio MAX

28 SoftImage 3D SoftImage 3D : , , SoftImage 3D 29 MAYA Silicon Graphics Alias Wavefront , ,

MAYA 30

Recently Viewed Presentations

  • Bias in the News

    Bias in the News

    Bias through Omission. Sometimes, certain facts or details will be cut out of a story, and others will be included. This can change how readers or viewers think about the story. Make sure to read several different sources to get...
  • Tartaglia, Benedetti, della Porta, Maurolyco

    Tartaglia, Benedetti, della Porta, Maurolyco

    Niccolo Fontana Tartaglia (1499./1500. - 1557.) Maurović Tamara, Psihologija Povijest fizike 2007/08 talijanski matematičar i inženjer (dizajnirao utvrde) bavio se topografijom (najbolji načini obrane i napada) prvi prevoditelj Euklidovih Elemenata i Arhimedovih djela na talijanski jezik prvi primijenio matematiku na...
  • Scheduling for FB network

    Scheduling for FB network

    This presentation will walk through the application requirements and potential technical approach, trying to start building a common understanding on our goal. Slide . Kazuyuki Sakoda, Sony. ... CNC: Central Network Configuration. Potential technology that 802.11be should consider (2)
  • Electrons In Atoms

    Electrons In Atoms

    More Quantum Mechanical Model. Determines allowed energies an electron can have and how likely it is to find the electron in various locations around the nucleus. These locations are called principal energy levels. Within these energy levels are sublevels. Sublevels...
  • Extended Routing-Signers

    Extended Routing-Signers

    Quality Compliance Management System. Welcome Valued Clients. Introducing: TMSWeb 7.3. Presenter: Renee Cabrey. This Presentation is an Overview of TMSWeb Version 7.3, which highlights enhancements for this release. There are many small but important changes that were directly recommended by...
  • 1 Reliability Issues of IGBT based Converters 19.07.2018

    1 Reliability Issues of IGBT based Converters 19.07.2018

    Firm stated that whenever converter-1/2 pump MCB trips concerned bogie isolated with display message "Auxiliaries HB2 - MCB(s) open in Aux Cubicle1/2, traction power may get reduced". Loco pilot Check MCBs in Auxiliary cubicle. Firm has been requested to make...
  • Unit 7 - Welcome to Biology!

    Unit 7 - Welcome to Biology!

    Astronomy Booklet Work Time! 30 minutes. The Electromagnetic Spectrum. ... Tides - Neap Tide. A Neap Tide occurs when the moon is in its quarter phases. The moon, Earth, and sun for a right angle. There is a smaller difference...
  •  ,  ,  ,  .  ,  ,  ,  ,

    , , , . , , , ,

    十架的爱,何等奇妙,. Great is Your love poured out for me, 我生命从此不再一样, Lord, my life never will be the same. 带我重回天父怀抱, I'm coming home into Your arms,