electronic
play

Electronic Mechanical [Image Courtesy: Pixar] [Image Courtesy: - PowerPoint PPT Presentation

Architectural Electronic Mechanical [Image Courtesy: Pixar] [Image Courtesy: humanproductivitylab.com Science Geometry(E+DD)projections Physics of light, color, appearance Algebra of transformations Engineering


  1. » Architectural » Electronic » Mechanical

  2. [Image Courtesy: Pixar]

  3. [Image Courtesy: humanproductivitylab.com

  4. » Science • Geometry(E+DD)projections • Physics of light, color, appearance • Algebra of transformations » Engineering • Graphics software libraries, GUI • Graphics processor architectures » Art • Color and perception • Illustrative views

  5. • Imaging = representing 2D images

  6. • Imaging = representing 2D images • Modeling = representing 3D objects

  7. • Imaging = representing 2D images • Modeling = representing 3D objects • Rendering = constructing 2D images from 3D models

  8. • Imaging = representing 2D images • Modeling = representing 3D objects • Rendering = constructing 2D images from 3D models • Animation = simulating changes over time

  9. • OpenGL is a software API to graphics hardware. • Designed as a streamlined, hardware-independent interface. • Intuitive, procedural interface with ‘ C/C++’ binding. • To access the system, we have to used a library called GL. • Omitted windowing and input to avoid window system dependencies .

  10. OpenGL core library (GL) • OpenGL32 on Windows • GL on most unix/linux systems (libGL.a) OpenGL Utility Library (GLU) • Provides functionality in OpenGL core but avoids having to rewrite code Links with window system (GLUT)  GLX for X window systems, WGL for Windows  Cross-platform GUI libraries: GLUT, SDL, FLTK, QT, …

  11. C++ with GDI * More than 400 LOC C++ with OpenGL * Less than 20 LOC

  12. Per Vertex Polynomial Operations & Evaluator Primitive Assembly Display Per Fragment Frame CPU Rasterization List Operations Buffer Texture Memory Pixel Operations

  13. int main( int argc, char ** argv){ glutInit( &argc, argv); glutCreateWindow( argv[0] ); glutDisplayFunc( display); glutMainLoop(); return 0; } void display(){ glClear( GL_COLOR_BUFFER_BIT); glBegin( GL_TRIANGLES); glVertex2f( 0, -.5); glVertex2f( -.5, .5); glVertex2f( .5, .5); glEnd(); glFlush(); }

  14. (-1,1) (1,1) int main( int argc, char ** argv){ glutInit( &argc, argv); glutCreateWindow( argv[0] ); glutDisplayFunc( display); glutMainLoop(); return 0; (0,0) } void display(){ glClear( GL_COLOR_BUFFER_BIT); glBegin( GL_TRIANGLES); glVertex2f( 0, -.5); (-1,-1) (1,-1) glVertex2f( -.5, .5); glVertex2f( .5, .5); glEnd(); glFlush(); }

  15. • Translate , glTranslatef( dx, dy, dz); • Rotate, glRotatef(angle, x, y, z); • Scale, glScalef( sx, sy, sz);

  16. glColor3f(1.0f , 0.7f, 0.0f);

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend