Docsity

Computer Graphics Notes Brur, Exams of Computer Graphics

Toggle sidebar
bg1
Computer Graphics:
The term of Graphics comes from Greek “graphikos” which means
'something written' e.g. autograph. So, Graphics are visual images or
designs on some surface, such as a wall, canvas, screen, paper, or stone to
inform, illustrate, or entertain.
Computer Graphics
Computer Graphics describes any use of computers to create or manipulate images.
Computer graphics is an art of drawing pictures on computer screens with the help
of programming. It involves computations, creation, and manipulation of data. In
other words, we can say that computer graphics is a rendering tool for the generation
and manipulation of images.
Computer Graphics is about drawing things on the screen with pixels, using
mathematics and physics (trigonometry, lighting, shading, curvature etc. ) to give
the impression of objects to a human viewer.
The output requirements can be simple e.g. arcade games, or complex e.g. realistic
rendition for movies.
Image Processing is about taking a digital input (black & white photo or color
photo or scanned image or Xerox copy etc. ) and using mathematics and physics
(trigonometry, lighting, shading, curvature etc. ) to extract details of objects in that
input.
Cathode Ray Tube
The primary output device in a graphical system is the video monitor. The
main element of a video monitor is the Cathode Ray Tube (CRT), shown in
the following illustration.
The operation of CRT is very simple −
• The electron gun emits a beam of electrons (cathode rays).
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a

Partial preview of the text

Download Computer Graphics Notes Brur and more Exams Computer Graphics in PDF only on Docsity!

Computer Graphics: The term of Graphics comes from Greek “ graphikos” which means 'something written' e.g. autograph. So, Graphics are visual images or designs on some surface, such as a wall, canvas, screen, paper, or stone to inform, illustrate, or entertain. Computer Graphics Computer Graphics describes any use of computers to create or manipulate images. Computer graphics is an art of drawing pictures on computer screens with the help of programming. It involves computations, creation, and manipulation of data. In other words, we can say that computer graphics is a rendering tool for the generation and manipulation of images. Computer Graphics is about drawing things on the screen with pixels, using mathematics and physics (trigonometry, lighting, shading, curvature etc. ) to give the impression of objects to a human viewer. The output requirements can be simple e.g. arcade games, or complex e.g. realistic rendition for movies. Image Processing is about taking a digital input (black & white photo or color photo or scanned image or Xerox copy etc. ) and using mathematics and physics (trigonometry, lighting, shading, curvature etc. ) to extract details of objects in that input.

Cathode Ray Tube

The primary output device in a graphical system is the video monitor. The main element of a video monitor is the Cathode Ray Tube (CRT), shown in the following illustration. The operation of CRT is very simple −

  • The electron gun emits a beam of electrons (cathode rays).
  • The electron beam passes through focusing and deflection systems that direct it towards specified positions on the phosphor-coated screen.
  • When the beam hits the screen, the phosphor emits a small spot of light at each position contacted by the electron beam.
  • It redraws the picture by directing the electron beam back over the same screen points quickly. There are two ways (Random scan and Raster scan) by which we can display an object on the screen.

Raster Scan

In a raster scan system, the electron beam is swept across the screen, one row at a time from top to bottom. As the electron beam moves across each row, the beam intensity is turned on and off to create a pattern of illuminated spots. Picture definition is stored in memory area called the Refresh Buffer or Frame Buffer. This memory area holds the set of intensity values for all the screen points. Stored intensity values are then retrieved from the refresh buffer and “painted” on the screen one row (scan line) at a time as shown in the following illustration. Each screen point is referred to as a pixel (picture element) or pel. At the end of each scan line, the electron beam returns to the left side of the screen to begin displaying the next scan line.

  • Weather Maps − Real-time mapping, symbolic representations.
  • Satellite Imaging − Geodesic images.
  • Photo Enhancement − Sharpening blurred photos.
  • Medical imaging − MRIs, CAT scans, etc. - Non-invasive internal examination.
  • Engineering drawings − mechanical, electrical, civil, etc. - Replacing the blueprints of the past.
  • Typography − The use of character images in publishing - replacing the hard type of the past.
  • Architecture − Construction plans, exterior sketches - replacing the blueprints and hand drawings of the past.
  • Art − Computers provide a new medium for artists.
  • Training − Flight simulators, computer aided instruction, etc.
  • Entertainment − Movies and games.
  • Simulation and modeling − Replacing physical modeling and enactments Some definitions that need to understand display devices: Pixel : “ The smallest displayable point on the screen is called the pixel .” Resolution : “ The maximum number of pixels per inch that can be displayed without overlap is the resolution ”, it’s measured as dpi (dots per inch) or ppi (points per inch). Bit Depth (colour depth): Number of bits used to represent a single pixel. This concept is known as bits per pixel (bpp). RGB colour system with 24 bits per pixel is known as full colour system or true colour system. Refresh Rate: Number of times the screen is redrawn by the raster scan in a second. I.e. how many times the electron guns are told to fire by the video source. The refresh rate is thus also limited by the resolution. This is normally more than 60Hz.

Aspect Ratio: “ Number of pixels in the horizontal direction to the number of pixels in the vertical direction that are required to produce a line of same length ”. The pixels on all the display devices are not evenly distributed in horizontal and vertical direction. That is why the screens are rectangular. All latest TVs and monitors have aspect ratio of 16:9, for a better viewing experience. The aspect ratio of human eye is 21:9.

Image types

Two-dimensional: 2D computer graphics are the computer-based generation of digital images— mostly from models, such as digital image, and by techniques specific to them. 2D computer graphics are mainly used in applications that were originally developed upon traditional printing and drawing technologies such as typography. In those applications, the two-dimensional image is not just a representation of a real-world object, but an independent artifact with added semantic value; two-dimensional models are therefore preferred because they give more direct control of the image than 3D computer graphics, whose approach is more akin to photography than to typography. Pixel art A large form of digital art, pixel art is created through the use of raster graphics software, where images are edited on the pixel level. Graphics in most old (or relatively limited) computer and video games, graphing calculator games, and many mobile phone games are mostly pixel art. Sprite graphics A sprite is a two-dimensional image or animation that is integrated into a larger scene. Initially including just graphical objects handled separately

when working with raster tools and formats is best practice. There are times when both formats come together. An understanding of the advantages and limitations of each technology and the relationship between them is most likely to result in efficient and effective use of tools. Three-dimensional 3D graphics, compared to 2D graphics, are graphics that use a three- dimensional representation of geometric data. For the purpose of performance, this is stored in the computer. This includes images that may be for later display or for real-time viewing. Despite these differences, 3D computer graphics rely on similar algorithms as 2D computer graphics do in the frame and raster graphics (like in 2D) in the final rendered display. In computer graphics software, the distinction between 2D and 3D is occasionally blurred; 2D applications may use 3D techniques to achieve effects such as lighting, and primarily 3D may use 2D rendering techniques. 3D computer graphics are the same as 3D models. The model is contained within the graphical data file, apart from the rendering. However, there are differences that include the 3D model is the representation of any 3D object. Until visually displayed a model is not graphic. Due to printing, 3D models are not only confined to virtual space. 3D rendering is how a model can be displayed. Also can be used in non-graphical computer simulations and calculations.

Computer animation Example of Computer animation produced using Motion capture Computer animation is the art of creating moving images via the use of computers. It is a subfield of computer graphics and animation. Increasingly it is created by means of 3D computer graphics, though 2D computer graphics are still widely used for stylistic, low bandwidth, and faster real- time rendering needs. Sometimes the target of the animation is the computer itself, but sometimes the target is another medium, such as film. It is also referred to as CGI (Computer-generated imagery or computer- generated imaging), especially when used in films. Virtual entities may contain and be controlled by assorted attributes, such as transform values (location, orientation, and scale) stored in an object's transformation matrix. Animation is the change of an attribute over time. Multiple methods of achieving animation exist; the rudimentary form is based on the creation and editing of keyframes, each storing a value at a given time, per attribute to be animated. The 2D/3D graphics software will change with each keyframe, creating an editable curve of a value mapped over time, in which results in animation. Other methods of animation include procedural and expression-based techniques: the former consolidates related elements of animated entities into sets of attributes, useful for creating particle effects and crowd simulations; the latter allows an evaluated result returned from a user-defined logical expression, coupled with mathematics, to automate animation in a predictable way (convenient for controlling bone behavior beyond what a hierarchy offers in skeletal system set up).To create the illusion of movement, an image is displayed on the computer screen then quickly replaced by a new image that is similar to the previous image, but shifted slightly. This technique is identical to the illusion of movement in television and motion pictures.

3D projection 3D projection is a method of mapping three dimensional points to a two dimensional plane. As most current methods for displaying graphical data are based on planar two dimensional media, the use of this type of projection is widespread, especially in computer graphics, engineering and drafting. Ray tracing Ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane. The technique is capable of producing a very high degree of photorealism; usually higher than that of typical scanline rendering methods, but at a greater computational cost. Shading Example of shading. Shading refers to depicting depth in 3D models or illustrations by varying levels of darkness. It is a process used in drawing for depicting levels of darkness on paper by applying media more densely or with a darker shade for darker areas, and less densely or with a lighter shade for lighter areas. There are various techniques of shading including cross hatching where perpendicular lines of varying closeness are drawn in a grid pattern to shade an area. The closer the lines are together, the darker the area appears. Likewise, the farther apart the lines are, the lighter the area appears. The term has been recently generalized to mean that shaders are applied. Texture mapping Texture mapping is a method for adding detail, surface texture, or colour to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in 1974. A texture map is applied (mapped)

to the surface of a shape, or polygon. This process is akin to applying patterned paper to a plain white box. Multitexturing is the use of more than one texture at a time on a polygon.[19]^ Procedural textures (created from adjusting parameters of an underlying algorithm that produces an output texture), and bitmap textures (created in an image editing application or imported from a digital camera) are, generally speaking, common methods of implementing texture definition on 3D models in computer graphics software, while intended placement of textures onto a model's surface often requires a technique known as UV mapping (arbitrary, manual layout of texture coordinates) for polygon surfaces, while non-uniform rational B-spline (NURB) surfaces have their own intrinsic parameterization used as texture coordinates. Texture mapping as a discipline also encompasses techniques for creating normal maps and bump maps that correspond to a texture to simulate height and specular maps to help simulate shine and light reflections, as well as environment mapping to simulate mirror-like reflectivity, also called gloss. Anti-aliasing Rendering resolution-independent entities (such as 3D models) for viewing on a raster (pixel-based) device such as a liquid-crystal display or CRT television inevitably causes aliasing artifacts mostly along geometric edges and the boundaries of texture details; these artifacts are informally called "jaggies". Anti-aliasing methods rectify such problems, resulting in imagery more pleasing to the viewer, but can be somewhat computationally expensive. Various anti-aliasing algorithms (such as supersampling) are able to be employed, then customized for the most efficient rendering performance versus quality of the resultant imagery; a graphics artist should consider this trade-off if anti-aliasing methods are to be used. A pre-anti- aliased bitmap texture being displayed on a screen (or screen location) at a resolution different than the resolution of the texture itself (such as a textured model in the distance from the virtual camera) will exhibit aliasing artifacts, while any procedurally defined texture will always show aliasing artifacts as they are resolution-independent; techniques such as mipmapping and texture filtering help to solve texture-related aliasing problems. 3D modeling 3D modeling is the process of developing a mathematical, wireframe representation of any three-dimensional object, called a "3D model", via specialized software. Models may be created automatically or manually; the manual modeling process of preparing geometric data for 3D computer

Random Scan In this system images are defined in term of Line segments instead of pixels. The electron beam is directed to only that part of the screen where the image is to be drawn. Random Scan monitor draw one picture at a time therefore they are also known as vector display. Refresh rate of random scan system depends on the number of lines to be displayed. Picture definition is stored in an area of memory called refresh display file. Random Scan ➢ These systems produce smooth lines. ➢ These systems are high in resolution. ➢ These systems are less expensive. ➢ These systems are designed only for drawing applications. ➢ These cannot produce realistic images. ➢ These cannot produce all the different colors. ➢ Random scan monitors use the beam penetration method for displaying color picture. What is raster scan display? How is raster scan technique being performed? A raster scan display system shows a protest as an arrangement of discrete focuses over each output line At the point when the beam is moved from left to right, it is ON. The beam is OFF when it is moved from ideal to left as appeared by dabbed line. The arrival to one side of the screen subsequent to invigorating each sweep line is known as the even remember of the electron bar. At the point when the electron beam achieves the base (or finishing one edge), it is made OFF and quickly remembered back to the upper left of the screen to begin again reviving technique. This is known as vertical retrace.

Advantages of Raster Scan Display: –

  1. Can show Realistic pictures
  2. Million unique hues can be produced
  3. Shadow scenes are conceivable Drawbacks of Raster Scan Display: –
  4. Low Resolution
  5. Electron beam coordinated to whole screen not exclusively to those parts of the screen where picture is to be drawn so tedious when the drawn picture estimate is especially not as much as the whole screen.
  6. Expensive Differentiate random scan and raster scan techniques.

Anti-aliasing Techniques:

  • Prefiltering. Prefiltering methods treat a pixel as an area, and compute pixel color based on the overlap of the scene's objects with a pixel's area. These techniques compute the shades of gray based on how much of a pixel's area is covered by a object. For example, a modification to Bresenham's algorithm was developed by Pitteway and Watkinson. In this algorithm, each pixel is given an intensity depending on the area of overlap of the pixel and the line. So, due to the blurring effect along the line edges, the effect of antialiasing is not very prominent, although it still exists. Prefiltering thus amounts to sampling the shape of the object very densely within a pixel region. For shapes other than polygons, this can be very computationally intensive.
  • Postfiltering. Supersampling or postfiltering is the process by which aliasing effects in graphics are reduced by increasing the frequency of the sampling grid and then averaging the results down. This process means calculating a virtual image at a higher spatial resolution than the frame store resolution and then averaging down to the final resolution. It is called postfiltering as the filtering is carried out after sampling.

Raster Vector Comprised of pixels, arranged to form an image Comprised of paths, dictated by mathematical formulas Constrained by resolution and dimensions Infinitely scalable Capable of rich, complex color blends Difficult to blend colors without rasterizing Large file sizes (but can be compressed) Small file sizes File types include .jpg, .gif, .png, .tif, .bmp, .psd; plus .eps and .pdf when created by raster programs File types include .ai, .cdr, .svg; plus .eps and .pdf when created by vector programs Raster software includes Photoshop and GIMP Vector software includes Illustrator, CorelDraw, and InkScape Perfect for “painting” Perfect for “drawing” Capable of detailed editing Less detailed, but offers precise paths When should you use raster or vector? Raster images are best for photos, while vectors are best for logos, illustrations, engravings, etchings, product artwork, signage, and embroidery. Some liken raster images to paintings and vectors to drawing; if your project requires complex color blends, such as in painting, raster is the preferred format; if your project requires scalable shapes and solid colors, such as in drawing, vector is the best choice. Many projects combine raster and vector images together: a brochure, for example, might include a corporate logo (vector) and a photo of happy customers (raster) – often coupled in layout software such as InDesign or QuarkXpress (though Illustrator and Photoshop can also be used to pair raster and vector images).

Rendering

Rendering or image synthesis is the automatic process of generating a photorealistic or non-photorealistic image from a 2D or 3D model (or models in what collectively could be called a scene file) by means of computer programs. Also, the results of displaying such a model can be called a render. A scene file contains objects in a strictly defined language or data structure; it would contain geometry, viewpoint, texture, lighting, and shading information as a description of the virtual scene. The data contained in the scene file is then passed to a rendering program to be processed and output to a digital image or raster graphics image file. The term "rendering" may be by analogy with an "artist's rendering" of a scene.

Rendering Techniques

There are three major computational techniques used for most rendering. Each has its own set of advantages and disadvantages, making all three viable options in certain situations.

  • Scanline (or rasterization): Scanline rendering is used when speed is a necessity, which makes it the technique of choice for real-time rendering and interactive graphics. Instead of rendering an image pixel-by-pixel, scanline renderers compute on a polygon by polygon basis. Scanline techniques used in conjunction with precomputed (baked) lighting can achieve speeds of 60 frames per second or better on a high-end graphics card.
  • Raytracing: In raytracing, for every pixel in the scene, one (or more) ray(s) of light are traced from the camera to the nearest 3D object. The light ray is then passed through a set number of "bounces", which can include reflection or refraction depending on the materials in the 3D scene. The color of each pixel is computed algorithmically based on the light ray's interaction with objects in its traced path. Raytracing is capable of greater photorealism than scanline but is exponentially slower.
  • Radiosity: Unlike raytracing, radiosity is calculated independent of the camera, and is surface oriented rather than pixel-by-pixel. The primary function of radiosity is to more accurately simulate surface color by accounting for indirect illumination (bounced diffuse light). Radiosity is typically characterized by soft graduated shadows and color bleeding, where light from brightly colored objects "bleeds" onto nearby surfaces. In practice, radiosity and raytracing are often used in conjunction with one another, using the advantages of each system to achieve impressive levels of photorealism. The Computer Graphics Pipeline The process that goes into the production of a fully realized 3D movie character or environment is known by industry professionals as the “computer graphics pipeline.” Even though the process is quite complex from a technical standpoint, it’s actually very easy to understand when illustrated sequentially. Think of your favorite 3D movie character. It could be Wall-E or Buzz Lightyear, or maybe you were a fan of Po in Kung Fu Panda. Even though these three characters look very different, their basic production sequence is the same. In order to take an animated movie character from an idea or storyboard drawing to a fully polished 3D rendering, the character passes through six major phases:
  1. Pre-production
  2. 3D Modeling
  3. Shading & Texturing
  4. Lighting
  5. Animation
  6. Rendering & Post-production