Computer Graphics — Super Quests

Ashiish
10 min readMay 7, 2019

--

STATE : MATRICES FOR HOMOGENEOUS CO-ORDINATE SYSTEM IN 3-DIMENSIONAL SCALING

DERIVE : EXPRESSION FOR DESCISION PARAMETER USED IN BRESENHAM’S CIRCLE DRAWING ALGORITHM

  • If d > 0, then (x+1, y-1) is to be chosen as the next pixel as it will be closer to the arc.
  • Else (x+1, y) is to be chosen as next pixel.

EXPLAIN : CYRUS BECK LINE CLIPPING ALGORITHM

  • The Cyrus–Beck algorithm is a generalized line clipping algorithm.
  • It was designed to be more efficient than the Cohen–Sutherland algorithm, which uses repetitive clipping.
  • Cyrus–Beck is a general algorithm and can be used with a convex polygon clipping window.
  • Unlike Sutherland–Cohen, which can be used only on a rectangular clipping area.
  • Parametric Equation : p(t) = tp1 + (1-t)p0

DIFFERENCE : BIT-MAP GRAPHICS & VECTOR GRAPHICS

They are composed of pixels / The are composed of paths.

Refresh process is advanced & it is independent on the resolution of the image / It flickers when the number of pixels are increased.

Scan conversion is required / Scan conversion is not required.

It costs less / It costs comparatively more.

They occupy more space depending on the image quality / They occupy less space.

EXPLAIN : PARALLEL PROJECT & STATE IT’S TYPES

  • In parallel projection, the distance from the center of projection to project plane is infinite. In this type of projection, We connect the projected vertices by line segments which correspond to connections on the original object.
  • Parallel projections are less realistic, But they are good for exact measurements.
  • There are 2 Types : Orthographic Parallel Projection & Oblique Parallel Projection.

DEFINE : COMPUTER GRAPHICS

  • Anything which is not text on a computer is treated as a computer graphics, Nowadays most of the computers use graphical user interface.
  • In simple words, Computer Graphics are pictures & films created using computers. They are made by using pixels & a resolution.

DEFINE : FRAME BUFFER

  • It is a portion of RAM which contains a bitmap that drives a video display. It is a memory buffer containing a complete frame of data.
  • Modern video cards contain frame buffer circuitry in their cores.

ENLIST : APPLICATIONS OF COMPUTER GRAPHICS

  • Gaming.
  • Presentation Graphics.
  • Animation.
  • VFX.
  • Computer Art.
  • Architecture.
  • Entertainment / Television.
  • Printing Technology.
  • Educational Software.

STATE : CHARACTERISTICS OF A DISPLAY ADAPTER

  • Screen Resolution, Color Depth & Memory.
  • Adapter Evolution.
  • GPU (Graphics Processing Unit)
  • Video Memory.
  • The RAMDAC.
  • The Video BIOS.
  • Video System Interface.
  • Drivers & Software.
  • Cables & Connections.
  • Multiple Display Adapter Technology.

DEFINE : PIXELS

  • A Pixel is a picture element or a physical element in a raster image which is made out of numerous pixels.
  • In simple words, It is a minute area of illumination / light on a display screen, One of many from which an image can be collected.

DEFINE : GRAPHICS PIPELINE

  • The Graphics Pipeline typically accepts some representation of 3-Dimensional scene as the input and results in an 2-Dimensional image as the output.
  • Some of the famous examples of Graphics Pipelines Models are “OpenGL” & “Direct3D” which are accepted by the industry standards.

DEFINE : RESOLUTION

  • It simply refers to the number of dots on the screen. The computer display generates colors by combining amounts of Red, Green & Blue which are controlled by 3 wires in the display cable.
  • And, It is expressed as a pair of numbers that give the number of dots on a horizontal line & the number of such vertical lines.

EXPLAIN : TEXT / CHARACTER MODE & GRAPHICS MODE

  • Text / Character Mode : When a display screen is divided into number of rows & columns of boxes then the mode of display is referred as a text mode. In the text mode, Each referred box is capable to hold a single character only.
  • Graphics Mode : In addition to the Text Mode, Most of the video adapters support a graphics mode, in which the display screen is divided into an array of pixels.

EXPLAIN : GRAPHICS FUNCTIONS & STANDARDS

  • There are 2 main functions of computer graphics which are “graphics.h” & “graphics.lib”. Here, The graphics.h header file contains definitions of all the graphics functions & constants & graphics.lib file contains the standard graphic functions.
  • By default, The systems sets to the text mode, so that it can be changed to the graphics mode.
  • These functions contain blocks of information that can be used in programs & etc.

DEFINE : L.E.D & L.C.D

  • Light Emitting Diode : LEDs are mostly the flat displays which use light emitting diodes for video display. Thus, When compared to the CRTs. LEDs displays will use less power & produce sharp colors. LEDs can be small displays or a part of a large display. LED diodes are used in order to make up an LED display.
  • Liquid Crystal Display : In a LCD display, The panels are fairly simple to understand; It is a flat panel display that uses light modulating properties of the liquid crystals. They do not emit light directly, Instead it uses a back-light or a reflector to produce images in a color or monochrome.

DIFFERENCE : RASTER SCAN & RANDOM, VECTOR SCAN

The electron beam starts at the top left corner of the screen & moves horizontally to the right and below according to the image / The electron beams is directed only to the parts where the picture is to be drawn.

It can be used in animations / It can be used to create diagrams, engineering & scientific models.

C.R.T (Cathode Ray Tubes) are used / Pen plotters & D.V.S.T (Direct Storage View Tubes) are used.

The cost of devices used for the raster scan is much cheaper / The cost of devices in random / vector scan are higher comparatively.

Requires more memory / Requires less memory comparatively.

EXPLAIN : RASTER SCAN & RANDOM, VECTOR SCAN

  • Raster Scan : The electron beam follows a fixed path, The electron beam starts at the top left corner of the screen from the above & moves horizontally to the right below, It defines a scan line. During the scan, The intensity of the beam is modulated according to the pattern of the desired image along the line.
  • Random / Vector Scan : Whereas in a Random / Vector scan, The devices operate by directing the electron beam to only those parts of the screen where the picture is formed / to be drawn. This is also known as vector graphics, It depends on the ability of hardware to generate line vectors.

DIFFERENCE : VIRTUAL REALITY & AUGMENTED REALITY

It replaces the real world with the artificial world / It enhances the real world with artificial information such as images, sounds & texts.

User can enter an entirely immersive world & cut off from the real world / User can interact with the real world & virtual world simultaneously.

Everything around is fabricated by the system, Which blacks out the real world in order to show the virtual world only / Everything is not fabricated & developed live with the real world.

It works better for video games, social networking in an virtual environment such as second life or playstation consoles / It works with a wearable device or a smartphone, which contains advanced software, sensors & compass.

Here, Full covering external devices such as an V.R Headset is used for the the complete set up / Here, Only a Smartphone or a advanced device is used which can set up the augmented reality.

EXPLAIN : V.R & A.R

  • Virtual Reality : It can be defined as a creation of simulated environment by using the computer technology, It immerses users in a complete artificial digital development. By using virtual reality devices, We can look in every direction as if we are physically at that location.
  • Augmented Reality : In augmented reality, The users can see & interact with the real world while the digital contents are added to it simultaneously. It simply applies technology to super-impose information such as the images, sounds & text which is visible in the real world.

STATE : ALGORITHM FOR DIGITAL DIFFERENTIAL ANALYZER

Get the input of both the end points (X1, Y1) & (X2, Y2).

Calculate the difference between both the end points (dx = x2 — x1).

Based on the calculated difference, Identify the number of steps to put pixel. If “dx > dy”, Then you need more steps in X co-ordinate; Otherwise Y co-ordinate (if abs(dx) > abs(dy); Then “Steps = abs(dx)” or else, Vice versa).

Calculate the increment in X co-ordinate & Y co-ordinate (Xinc = dx / steps; Yinc = dy / steps).

Put the pixel by successfully incrementing X & Y co-ordinates & complete the drawing of the line.

EXPLAIN : DIGITAL DIFFERENTIAL ANALYZER

  • It is a hardware / software used for impose variables over an interval between start point and the end point. DDAs are used for rasterization of Lines, Triangles and as well as Polygons.

DIFFERENCE : D.D.A ALGORITHM & BRESENHAM’S ALGORITHM

It is based on increment method / It is based on increment method.

Uses floating point / Uses only the integers.

It is Slower than Bresenham’s / It is Faster than Digital Differential Analyzer.

Uses multiplication & division operators / Uses addition & subtraction operators.

Floor & Cell functions should be used to display pixel / No functions are used to display a pixel.

DEFINE : STROKE METHOD & BIT-MAP METHOD & STAR-BUST METHOD

  • Stroke : This method created characters by using a set of line segments, We can develop our own stroke method by using any line generation method. Sequence of commands with it’s start point & end point is used for manual line generation.
  • Bit-Map : Here, The characters are represented by an array of dots. The size of array may vary but we can select any size of an array. This array is like a small buffer, Just big enough to hold a single character. The dots can be defined as the pixels of the small array.
  • Star-Bust : In this method, A fix pattern of line segments are used to generate characters, There are 24 line segments which are required to display for particular character that are highlighted, The pattern for characters are in the form of 24-Bit Code.

ENLIST : TYPES OF POLYGONS

  • Concave.
  • Convex.
  • Complex.

ENLIST : POLYGON FILLING METHODS

  • Seed Fill.
  • Flood Fill.
  • Boundary Fill.
  • Scan Line Algorithm.

EXPLAIN : EVEN-ODD METHOD

  • It is also known as the counting number method. In this method, While filling an object, We often need to identify whether the particular point is inside the object or outside the object. There are 2 methods by which the point can be identified.
  • Thus according to this question, In the Even Odd Method, We will count the edge crossing along the line from any point (x,y) to infinity. If the number of interactions are odd, Then the point (x,y) is an interior point; And if the number of interactions are even, Then the point (x,y) is an exterior point.

DEFINE : FLOOD FILL / SEED FILL ALGORITHM

  • Flood fill is an algorithm that determines the area connected to a given node in a multi-dimensional array.
  • It is used in the “Bucket” fill tool of paint programs to fill connected, similarly-colored areas with a different color
  • The flood-fill algorithm takes 3 parameters: A Start node, Target color, & Replacement color.
  • The algorithm looks for all nodes in the array that are connected to the start node by a path of the target color and changes them to the replacement color.
  • There are many ways in which the flood-fill algorithm can be structured.

DEFINE : BOUNDARY LINE ALGORITHM

  • Boundary Fill Algorithm starts at a pixel inside the polygon to be filled and paints the interior proceeding outwards towards the boundary.
  • This algorithm works only if the color with which the region has to be filled and the color of the boundary of the region are different.
  • If the boundary is of one single color, this approach proceeds outwards pixel by pixel until it hits the boundary of the region.

DEFINE : SCAN LINE ALGORITHM

  • This algorithm works by intersecting scan line with polygon edges and fills the polygon between pairs of intersections.
  • Find out the Ymin and Ymax from the given polygon.
  • Scan line intersects with each edge of the polygon from Ymin to Ymax. Name each intersection point of the polygon.
  • Sort the intersection point in the increasing order of X coordinate.
  • Fill all those pair of coordinates that are inside polygons and ignore the alternate pairs.

EXPLANATION : SHEARING

  • A Transformation that slants the shape of an object is called the shear transformation.
  • There are two shear transformations X-Shear and Y-Shear.
  • One shifts X coordinates values and other shifts Y coordinate values.
  • However, In both the cases only one coordinate changes its coordinates and other preserves its values. Shearing is also termed as Skewing.

DRAW & DEFINE : COHEN SUTHERLAND CLIPPING ALGORITHM

  • Cohen Sutherland is one of the most popular line clipping algorithm.
  • This algorithm immediately removes the lines which are lying totally outside the window.
  • It divides the plane in 9 parts & assigns a binary number to each part.

STATE : ALGORITHM OF “COHEN SUTHERLAND” LINE CLIPPING

Accept the window co-ordinates from the user & store them in xL, xH, yL & yH.

Accept the end points A & B of the line with components Ax, Ay, Bx & By.

Initialize A & B code as the array of size 4.

Calculate the Acode & Bcode by comparing them.

Check if Acode & Bcode are 0000, If yes; Display the line AB. If not; Then proceed.

Take logical AND of Acode & Bcode, Check if the result is non-zero, If it is; Then discard the line & go. If the result is zero; Then proceed.

Sub-divide the line by finding intersection of a line with the window boundary & Give new binary numbers to the intersection point.

End.

EXPLAIN : MID-POINT SUB DIVISION

  • It is used for clipping line. The line is divided in two parts. Mid points of line is obtained by dividing it in two short segments. Again division is done, By finding midpoint.
  • This process is continued until line of visible and invisible category is obtained. Let (xi,yi) are midpoint.
  • It is suitable for machines in which multiplication and division operation is not possible. Because it can be performed by introducing clipping divides in hardware.

EXPLAIN : WINDOW — TO — VIEW PORT TRANSFORMATION

  • Window : A world-coordinate area selected for display is called a window, It consists of a visual area containing some of the graphical user interface of the program it belongs to and is framed by a window decoration. A window defines a rectangular area in world coordinates.
  • View Port : An area on a display device to which a window is mapped is called a viewport, It defines in normalized coordinates a rectangular area on the display device where the image of the data appears.
  • Transformation : Window-to-Viewport transformation is the process of transforming a two-dimensional, world-coordinate scene to device coordinates. In particular, objects inside the world or clipping window are mapped to the viewport. The viewport is displayed in the interface window on the screen. In other words, the clipping window is used to select the part of the scene that is to be displayed. The viewport then positions the scene on the output device.
  • yvyvminyvmaxyvmin=ywywminywmaxywmin

--

--