K. J. Somaiya Institute of Engineering and Information Technology Sion, Mumbai-22 An Autonomous Institute affiliated to University of Mumbai Accredited by NAAC and NBA, Approved by AICTE, New Delhi Department of Electronics Engineering Computer Graphics (Subject Code: 1UAIC305) S Y Artificial intelligence & Data Science Semester-III Module/Topic Name : 1. Introduction and overview of Graphics system Ghanashyam Phadke Asst. Professor Department of Artificial intelligence and data Sciences K. J. Somaiya Institute of Engineering and Information Technology Sion, Mumbai Prepared and compiled By Ghanashyam Phadke, using various sources available on internet What we will discuss and explore in this module • Definition and Representative uses computer graphics • Overview of coordinate systems of Definition of scan conversion • Rasterization and rendering Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Definition and Representative uses computer graphics • Definition: “Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great deal of specialized hardware and software has been developed, with the displays of most devices being driven by computer graphics hardware. It is a vast and recently developed area of computer science. The phrase was coined in 1960 by computer graphics researchers Verne Hudson and William Fetter of Boeing. It is often abbreviated as CG, or typically in the context of film as computer generated imagery (CGI). The non-artistic aspects of computer graphics are the subject of computer science research.” Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Definition and Representative uses computer graphics • Computer graphic is an art of drawing pictures on computer screen with the help of programming. • The computer graphic is one of the most effective and commonly used way to communicate the processed information to the user. • It displays the information in the form of graphical objects such as pictures ,charts ,graphs and diagrams instead of simple text. • We can say that computer graphics makes its possible to express data in pictorial form. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Definition and Representative uses computer graphics • For our understanding we can split the word “ GRAPHICS” as “GRAPH” + “PICS” • Thus by and large we can say it is a visual ( picture/ graph/ text) displayed on a computer ( or any other digital equipment like mobile phone) screen • In earlier days it used to be associated with display on computer screen but now it has many forms as the “ computer” itself is available in many shapes. Sizes, forms. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Definition and Representative uses computer graphics • cartography • CAD (visualization of measurement data (2D and 3D)) • visualization of computer simulations. • medical diagnostics, • drafting , • preparation of publications(DTP), • special effects in movies, • computer games. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet CARTOGRAPHY • Cartography is the study and practice of making and using maps. Combining science, aesthetics, and technique, cartography builds on the premise that reality can be modeled in ways that communicate spatial information effectively. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet CAD (visualization of measurement data (2D and 3D)) • Computer-aided design (CAD) is the use of computers (or workstations) to aid in the creation, modification, analysis, or optimization of a design. • CAD software is frequently used by different types of engineers and designers. CAD software can be used to create twodimensional (2-D) drawings or threedimensional (3-D) models. • The purpose of CAD is to optimize and streamline the designer's workflow, increase productivity, improve the quality and level of detail in the design, improve documentation communications and often contribute toward a manufacturing design database. CAD software outputs come in the form of electronic files, which are then used accordingly for manufacturing processes. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet visualization of computer simulations • computer simulation, the use of a computer to represent the dynamic responses of one system by the behaviour of another system modelled after it. • A simulation uses a mathematical description, or model, of a real system in the form of a computer program. This model is composed of equations that duplicate the functional relationships within the real system. When the program is run, the resulting mathematical dynamics form an analog of the behaviour of the real system, with the results presented in the form of data. • A simulation USUALLY takes the form of a computer-graphics image that represents dynamic processes in an animated sequence. • Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Medical diagnostics • The medical domain provides excellent opportunities for the application of computer graphics, visualization and virtual environments, with the potential to help improve healthcare and bring benefits to patients. • Example applications • • • • • • • educational tools; diagnostic aids; virtual endoscopy; planning aids; guidance aids; skills training; computer augmented reality and use of high performance computing Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Drafting • Drafting, also spelled draughting, also called engineering drawing, graphical representation of structures, machines, and their component parts that communicates the engineering intent of a technical design to the craftsman or worker who makes the product. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Preparation of Publications(DTP) • Desktop publishing (DTP) is the creation of documents using page layout software on a personal ("desktop") computer. • This technology allows individuals, businesses, and other organizations to self-publish a wide variety of content, from menus to magazines to books, without the expense of commercial printing. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Special effects in movies • Computer-generated imagery (CGI) is the application of the field of computer graphics (or more specifically, 3D computer graphics) to special effects. • CGI is used in films, television programs and commercials, and in printed media. • CGI is used for visual effects because the quality is often higher and effects are more controllable than other more physically based processes, such as constructing miniatures for effects shots or hiring extras for crowd scenes, and because it allows the creation of images that would not be feasible using any other technology. • It can also allow a single artist to produce content without the use of actors, expensive set pieces, or props. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Special effects in movies • Ray tracing is the technique modern movies rely on to generate or enhance special effects. Think realistic reflections, refractions and shadows. Getting these right makes starfighters in sci-fi epics scream. It makes fast cars look furious. It makes the fire, smoke and explosions of war films look real. • Ray tracing produces images that can be indistinguishable from those captured by a camera. Live-action movies blend computer-generated effects and images captured in the real world seamlessly, while animated feature films cloak digitally generated scenes in light and shadow as expressive as anything shot by a cameraman. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Computer games. • A variety of computer graphic techniques have been used to display video game content throughout the history of video games. The predominance of individual techniques have evolved over time, primarily due to hardware advances and restrictions such as the processing power of central or graphics processing units. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Rasterization and rendering • Rasterization (or rasterisation) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (a series of pixels, dots or lines, which, when displayed together, create the image which was represented via shapes). • Rendering is the process involved in the generation of a twodimensional or three-dimensional image from a model by means of application programs. Rendering is mostly used in architectural designs, video games, and animated movies, simulators, TV special effects and design visualization. The techniques and features used vary according to the project. Rendering helps increase efficiency and reduce cost in design. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Rasterization • With rasterization, objects on the screen are created from a mesh of virtual triangles, or polygons, that create 3D models of objects. In this virtual mesh, the corners of each triangle — known as vertices — intersect with the vertices of other triangles of different sizes and shapes. A lot of information is associated with each vertex, including its position in space, as well as information about colour, texture and its “normal,” which is used to determine the way the surface of an object is facing. • Computers then convert the triangles of the 3D models into pixels, or dots, on a 2D screen. Each pixel can be assigned an initial colour value from the data stored in the triangle vertices. • Further pixel processing or “shading,” including changing pixel color based on how lights in the scene hit the pixel, and applying one or more textures to the pixel, combine to generate the final color applied to a pixel. • This is computationally intensive. There can be millions of polygons used for all the object models in a scene, and roughly 8 million pixels in a 4K display. And each frame, or image, displayed on a screen is typically refreshed 30 to 90 times each second on the display. • Additionally, memory buffers, a bit of temporary space set aside to speed things along, are used to render upcoming frames in advance before they’re displayed on screen. A depth or “z-buffer” is also used to store pixel depth information to ensure front-most objects at a pixel’s x-y screen location are displayed on-screen, and objects behind the front-most object remain hidden. • This is why modern, graphically rich computer games rely on powerful GPUs. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Image Vectors What is a Vector? Vector data are composed of vertices and paths. For example, the three types of vectors are points, polylines, and polygons. Vector points are simple XY coordinates in space. Point Vector Data Type Polylines connect XY coordinates called vertices with paths. Vector Data Type Line Lastly, vector polygons are a set of closed vertices and paths. Vector Data Type Polygon And we often store these points, lines and polygons in shapefiles, geodatabases and various other GIS file formats. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet Rasterization • Discrete rasters are categorical and have distinct values identifying each cell. For example a land cover raster might represent urban as the value 1 and forest as 2. • Discrete raster • Continuous rasters are grid cells with gradual changing data such as elevation, temperature or an aerial photograph. Continuous data is also known as nondiscrete or surface data. Prepared and compiled By Ghanashyam Phadke, using various sources available on internet