1 / 24

2D TRANSFORMATION Prepared by, Prof. Samina Anjum Department CSE, ACET

2D TRANSFORMATION Prepared by, Prof. Samina Anjum Department CSE, ACET. Syllabus:- COMPUTER GRAPHICS. UNIT‐ I

Download Presentation

2D TRANSFORMATION Prepared by, Prof. Samina Anjum Department CSE, ACET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 2D TRANSFORMATION Prepared by,Prof. Samina AnjumDepartment CSE, ACET

  2. Syllabus:- COMPUTER GRAPHICS UNIT‐ I Introduction to Computer Graphics :Overview of Computer Graphics, Computer Graphics Application and Software, Graphics Areas,Graphics Pipeline, Graphics API’s, Numerical issues, Efficiency Display and Hardcopy Technologies, Display Technologies – Raster scan Display System, Video Controller – Vector scan display system, Random Scan Display Processor, Input Devices for Operator Interaction, Image Scanners UNIT‐ II Basic Raster Graphics Algorithms for Drawing 2D primitives, aliasing and ant aliasing, Polygon filling methods: Scan Conversion Algorithms: Simple Ordered edge list, Edge Fill, Fence fill and Edge Flag Algorithm. ,Seed fill Algorithms: Simple and Scan Line Seed Fill Algorithm, Halftoning techniques UNIT‐ III Graphics Programming using OPENGL: Why OpenGL, Features in OpenGL, OpenGL operations, Abstractions in OpenGL – GL, GLU & GLUT, 3D viewing pipeline, viewing matrix specifications, a few examples and demos of OpenGL programs, Animations in openGL

  3. Syllabus:- COMPUTER GRAPHICS UNIT ‐IV 2D Clipping algorithms for regular and irregular windows: Sutherland Cohen Outcode, Sutherland Cohen Subdivision, Mid-Point subdivision, Cyrus Beck and Sutherland Hodgeman, Cohen-Sutherland Polygon clipping Algorithm. Clipping about Concave regions. 2D Transformations, Translation, Rotation, Reflection, Scaling, Shearing Combined Transformation, Rotation and Reflection about an Arbitrary Line UNIT ‐V Normalized Device Coordinates and Viewing Transformations, 3D System Basics and 3D Transformations, 3D graphics projections, parallel, perspective, viewing transformations. 3D graphics hidden surfaces and line removal, painter’s algorithm, Z -buffers, Warnock’s algorithm. UNIT ‐VI Basic Ray tracing Algorithm, Perspective, Computing Viewing Rays, Ray-Object Intersection Shading, A Ray tracing Program, Shadows, Ideal Specular Reflection.Curves and Surfaces: Polygon Mesh, Parametric Cubic Curves, Parametric Bicubic Surfaces, Quadratic Surface, Bezier Curves and B-spline curves.

  4. COURSE OUTCOME • CO 4 – Analyze and apply clipping algorithms and transformation on 2D images.

  5. 2D Transformations • Transformation means changing some graphics into something else by applying rules or • Transformations alter points between coordinate systems (2,4) (1,3) U=X-1 V=Y-1 V V Y Y U U X=U+1 Y=V+1 X X

  6. 2D Transformations • Transformations transform a point’s shape and location in one coordinate system (2,2) X'=X-1 Y’=Y-1 Y Y (2,1) X=X’+1 Y=Y’+1 X X

  7. Why Transformations? • Transformations are linear • Transforming all the individual points on a line gives the same set of points as transforming the endpoints and joining them. • Geometric transformation allows us to calculate the new co-ordinates.

  8. Types of Transforms • Transformation can be serene as a series of simple transformations: • Translation • Scaling • Rotation • Shear • Reflection Basic transformations Advanced transformations

  9. 2D Translation • It is a process of changing the position of an object on the screen P’(X’,Y’) Y Y ty X tx X X’=X+tx Y’=Y+ty

  10. 2D Scaling • Scaling is a transformation reduces the size in each dimension of an object. Y Y syY Y X X X sxX

  11. 2D Rotation • Rotate counter-clockwise about the origin by an angle  Y Y  X X

  12. Basic Transformations Matrix are • Translation: T= • Rotation: R= • Scaling: S=

  13. Example:- Translate a square ABCD with the co-ordinates A(0,0),B(5,0),C(5,5),D(0,5) by 2 units in X-direction and 3 units in Y- direction on the screen. Solution:- Translation, Given:- tx = 2 and ty = 3

  14. Therefore, Given:- tx = 2 and ty = 3

  15. The transformation matrix is = Therefore,

  16. Therefore, A’(2,3) B’(7,3) C’(7,8) D’(2,8) D’ C’ A’ B’

  17. Example:- Scale the square ABCD with the co-ordinates A(0,0),B(3,0),C(3,3),D(0,3) by 3 units in X-direction and 3 units in Y- direction with respect to origin. Solution:- Scaling, Given:- Sx = 3 and Sy = 3

  18. Therefore, Given:- tx = 3 and ty = 3

  19. The scaling matrix is = Therefore,

  20. Therefore, A’(0,0) B’(9,0) C’(9,9) D’(0,9) D’ C’ B’ A’

  21. Rotating About An Arbitrary Point • What happens when you apply a rotation transformation to an object that is not at the origin? • Solution: • Translate the center of rotation to the origin • Rotate the object • Translate back to the original location

  22. Rotating About An Arbitrary Point Y Y X X Y Y X X

  23. Homogeneous Transform Advantages • Combined analysis of transformation as matrix multiplication • Easier in h/w and s/w • To create transformations, simply multiply matrices • Order matters: ABis generally not the same as BA • Allows for non transformations: • Perspective projections! • Bends, tapers, many others

  24. THANKYOU!

More Related