Exhaustive Study Notes for Computer Display Engineering

Applications and Fields of Computer Graphics

Computer graphics is an expansive field with numerous historical and contemporary applications. In design support, tools like AutoCAD and OrCAD are used for engineering and circuit design. Information representation tasks utilize charts, graphs, diagrams, and maps across disciplines such as science, finance, and management. In the realms of art and entertainment, software like Adobe Photoshop, Paint Shop Pro, and 3D Studio assist designers, painters, and fashion stylists. Computer-generated imagery (CGI) is also fundamental to modern cinematography, as seen in films like Jurassic Park, Titanic, and Water World, as well as in the broader gaming industry. Furthermore, computer graphics facilitate communication between computers and users (UI/UX) and play a critical role in education and training, such as simulations for driving cars, piloting planes, traffic control, and automated testing for driving licenses.

Computer Monitor Technologies and Display Types

Currently, there are three primary types of computer and television screens: Cathode Ray Tube (CRT), Liquid Crystal Display (LCD), and Plasma Display Panel (PDP).

CRT monitors utilize a fluorescent screen to display pixels. Their advantages include a lower cost compared to other technologies, extremely faithful color quality with excellent contrast, and high durability. However, they suffer from low resolution, a heavy and bulky physical profile compared to LCD or LED counterparts, high power consumption, and poor signal reception capabilities.

LCD and LED screens operate on the principle of light blocking. Their advantages include sharp and faithful image reproduction, high brightness, and widespread availability as safe technology. Their primary drawbacks involve power consumption and poor visibility in direct sunlight due to relatively low pixel density on specific LCD types.

Plasma Display Panels (PDP) offer vibrant and sharp colors with wide viewing angles that ensure image quality is maintained from any direction. Their disadvantages include high power consumption, a tendency to generate heat (overheating), and poor performance in high-ambient light environments.

Screen Metrics and Technical Specifications

Screen size is measured in inches, determined by the diagonal length between two opposite corners of the screen (excluding the bezel). For conversion, 1inch=2.54cm1\,\text{inch} = 2.54\,\text{cm}. For example, a 49inch49\,\text{inch} television has a diagonal length spanning 49inches49\,\text{inches} from corner to corner.

Screen resolution refers to the maximum number of pixels that can be displayed on a screen, typically expressed as a horizontal by vertical count (e.g., 640×480640 \times 480 or 1024×7201024 \times 720).

Aspect ratio is the ratio of horizontal to vertical units required to produce a line of unit length in both directions on the screen. For instance, if a screen has an aspect ratio of 3/43/4, it implies that 33 vertical units correspond to 44 horizontal units.

Frame Buffers and Color Representation

A frame buffer is a specialized memory region that stores color values for every pixel on the screen, maintaining a bijective (one-to-one) mapping between the buffer and the display. For black and white (monochrome) images, each pixel requires only 1bit1\,\text{bit} of storage. For color images, if nn bits are allocated per pixel, the system can represent 2n2^n distinct color values.

Refresh rate is defined as the number of times per second (measured in Hertz, Hz) that the image on the screen is updated. Current LCD screens typically feature refresh rates ranging from 60Hz60\,\text{Hz} to 144Hz144\,\text{Hz}.

Color Spaces and Models

The RGB color space is a model built upon three primary base colors: Red, Green, and Blue. Every color in this space is a combination of these three values, represented similarly to a vector using three basis vectors: R, G, and B.

The HSL color space stands for Hue, Saturation, and Lightness. It is represented within a cylindrical coordinate system, specifically constrained within two cones joined at their bases (a double cone). In this model, H (Hue) corresponds to the angular coordinate, and S (Saturation) is the distance to the vertical axis L (Lightness).

The HSV color space stands for Hue, Saturation, and Value. This is also represented in cylindrical coordinates but is constrained within a single cone. H (Hue) is the angular coordinate, and S (Saturation) is the distance to the vertical axis V (Value), which corresponds to the diagonal connecting the Black and White vertices.

Programming Languages and Graphic Applications

Common programming languages used in the field include C, Pascal, Fortran, and Java. However, C++ is frequently chosen due to its high compatibility, syntax that aligns closely with logical thinking—allowing for fast and simple coding—and its multi-paradigm nature supported by extensive libraries. In MATLAB, the RGB color space is the standard representation used for image processing and graphics.

A graphics application is software designed for both programmers and non-programmers, allowing users to create images without needing to understand the underlying mechanics of how those images are generated. Examples include Adobe Photoshop, AutoCAD, 3D Studio, Surfer, TECPLOT, and MapInfo. MATLAB is also a powerful tool for signal and image processing, communication, automatic control design, testing and measurement, financial modeling, biological computing, and general 2D/3D graphics and programming.

2D Graphics and Coordinate Systems

In 2D space, several coordinate systems are utilized: Polar, Cartesian, Device, Real (World), and Homogeneous. The 2D Cartesian system identifies a point on a plane using an ordered pair of numbers (x,y)(x, y) relative to the Oxy axes. The Polar coordinate system determines a point's position based on its distance from an origin and an angle from a fixed reference direction.

A right-handed (normal) coordinate system is a Cartesian system where each point is described by real numbers, (0,0)(0, 0) is the origin, and positive directions follow the right-hand rule. This is typically applied in standard geometry. A left-handed (inverse) coordinate system describes points with (0,0)(0, 0) at the origin, but the positive direction of the Oy axis is opposite to the right-handed system. This is widely used in computer graphics, image processing software, and robot control systems. In computer graphics, the origin (0,0)(0, 0) of a screen is typically defined as the first pixel at the top-left corner.

The Display Pipeline and Graphical Primitives

The general procedure for displaying real objects on a computer screen consists of three steps:

  1. Components are described in their own local coordinate system (local or model coordinates).
  2. Components are placed into an image position via the real-world coordinate system.
  3. Image descriptions in real-world coordinates are transformed into the specific coordinate system of the display (device coordinates).

Basic graphic primitives include:

  • Points: Defined by a set of coordinates with attributes such as color and symbolic representation.
  • Lines and Polylines: A line is defined by two points. Attributes include color, line width, and line style (e.g., solid, dashed).
  • Fill Regions: Attributes include border properties and internal properties (fill color and fill pattern).
  • Characters and Text Strings: Attributes include color, font, size, character spacing, alignment, orientation, and slant (italics).

To represent a polyline on screen, one needs the coordinates of all vertices, attributes (color, thickness), and the drawing method (line vs. curve). To represent a region, one needs vertex coordinates, attributes (color, transparency), and the filling method (solid vs. gradient). A circle requires a center and a radius.

2D Geometric Transformations

Linear transformations apply mathematical operations to point coordinates.

Translation involves moving an object by a fixed vector. If two translations are applied consecutively, the result is a new translation where the vector is the sum of the two original vectors.

Scaling involves resizing an object relative to a fixed ratio. Applying two scaling transformations consecutively results in a new scaling transformation where the scale factor is the product of the two original factors. To scale a rectangle by factors aa and bb, one multiplies the xx and yy coordinates by these factors.

Rotation in 2D space involves turning a point around the origin by an angle θ\theta. Applying two rotations consecutively results in a rotation by an angle equal to the sum of the two individual angles.

Symmetry and Arbitrary Center Transformations

Symmetry (Reflection) can be viewed as a rotation of 180180 degrees around an axis. For an axis-based symmetry across the Y-axis (tung độ), the transcript defines a process where the horizontal coordinate is preserved and the vertical coordinate is changed to its opposite value. For example, a square with vertices A(2,3)A(2, 3), B(4,3)B(4, 3), C(4,5)C(4, 5), and D(2,5)D(2, 5) transformed this way would result in A(2,3)A'(2, -3), B(4,3)B'(4, -3), C(4,5)C'(4, -5), and D(2,5)D'(2, -5).

To perform a rotation around an arbitrary center point I(Xi,Yi)I(X_i, Y_i) by an angle α\alpha, one follows these steps:

  1. Translate the center I(Xi,Yi)I(X_i, Y_i) to the origin.
  2. Perform a rotation around the origin by angle α\alpha.
  3. Translate the origin back to the center point II.

3D Graphics and Coordinate Systems

3D space uses Cartesian, Spherical, and Cylindrical coordinate systems. The 3D Cartesian system consists of three mutually perpendicular axes (Ox - abscissa, Oy - ordinate, Oz - applicate/height) with unit vectors i\mathbf{i}, j\mathbf{j}, and k\mathbf{k}.

The Spherical coordinate system represents points on a spherical surface using three values: radius rr, angle θ\theta, and angle ϕ\phi. A point is defined by its distance from the origin, its elevation angle from a fixed plane, and its longitudinal angle of projection onto that plane.

Right-handed 3D systems follow the rule where if the right thumb points along the positive z-axis, the fingers curl from the x-axis to the y-axis. Left-handed systems follow the same logic using the left hand.

The 3D Rendering Pipeline

Displaying 3D objects on a 2D screen involves a complex workflow:

  1. Modeling: Constructing object models (volumetric or boundary-determined).
  2. Model Transformation: Moving objects into a global world space containing light and observers.
  3. Simple Removal: Discarding invisible objects to optimize processing.
  4. Lighting: Assigning colors based on material properties and light sources.
  5. Viewing Transformation: Converting from world space to observer-centered viewing space.
  6. Clipping: Removing object parts outside the field of view.
  7. 2D Projection: Mapping 3D coordinates onto a 2D plane.
  8. Rasterization: Converting objects into pixels for the display device.

To draw a 3D line, one must project each endpoint into 2D points and draw the line connecting those 2D image points.

Wireframe Modeling and Data Structures

Wireframe modeling represents objects using a set of vertices and connecting edges. Advanced techniques include shading and the removal of hidden lines and surfaces. Standard data tables for wireframes include:

  1. Connection Data Table: Name, index, position, and technical specs.
  2. Connection Structure Table: Describes components like beams, columns, joints, and technical characteristics.
  3. Load Table: Static, dynamic, and temporary loads.
  4. Material Table: Materials used (steel, wood, concrete) and technical parameters.
  5. Calculation Table: Results regarding force, motion, and displacement.

3D Projection Techniques

Parallel Projection uses lines passing through vertices that are parallel to each other. It preserves the linear relationship between dimensions and keeps lines parallel or coincident. Properties include preserving the order of points and transforming lines to lines, but it does not provide a realistic representation of 3D depth. Practical uses include sizing checks in manufacturing, technical drawings in architecture, and 3D graphics effects.

Perspective Projection uses projection lines that converge at a single point called the center of projection. It creates a more realistic image but does not preserve dimensional relationships. Properties: parallel lines in 3D appear to converge, distances between objects change in the projection, and object size varies proportionally with the distance to the projection plane. The Scale Factor in perspective projection controls the image size; a factor greater than 11 is a magnification (zoom in), less than 11 is a reduction (zoom out), and exactly 11 is an exact copy.

Surface Representation: Meshes and Grids

Polygon Meshes create images by stitching together small polygons (usually triangles or quadrilaterals). Each polygon has its own color, position, and size.

Triangle Meshes present a simple structure with highly efficient computational processing, making them compatible with algorithms like Delaunay triangulation. However, they have limited detail for complex shapes and struggle to represent smooth curves without using extremely high counts of tiny triangles.

General Polygon Meshes provide greater flexibility and variety, capable of representing complex shapes and smooth curves with high detail. However, they are more computationally complex and require higher memory and processing resources.

3D Geometric Transformations

Linear transformations in 3D preserve straight lines, parallelism, and distance ratios.

3D Translation is represented by a matrix; applying two translations sequentially results in another translation.

3D Scaling involves a transformation matrix where the origin OO remains a fixed point (the center of scaling). To scale relative to an arbitrary center (xf,yf,zf)(x_f, y_f, z_f), the steps are: translate the fixed point to the origin, perform the scaling, and translate back. The general scaling matrix is given by:

S(sx,sy,sz)=(sx0000sy0000sz00001)S(s_x, s_y, s_z) = \begin{pmatrix} s_x & 0 & 0 & 0 \\ 0 & s_y & 0 & 0 \\ 0 & 0 & s_z & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}

3D Rotation matrices exist for the x, y, and z axes. To rotate around an arbitrary axis defined by a vector k\mathbf{k} passing through two points P0P_0 and P1P_1:

  1. Translate P0P_0 to the origin.
  2. Rotate around the x-axis by angle α\alpha to align the axis with the Oxz plane.
  3. Rotate around the y-axis by angle β-\beta to align the axis with the z-axis.
  4. Rotate around the z-axis by the desired angle.
  5. Apply the inverse of the first three transformations in reverse order.

Visible Surface Determination (Hidden Surface Removal)

Techniques to remove hidden lines and surfaces include:

  • Depth Buffer (Z-Buffer): An image-space approach storing the smallest z-coordinate (depth) for every pixel. It uses two buffers: one for depth values and a frame buffer for color values.
  • Scan-line Algorithm: For every scan line, intersections with polygons are analyzed. If an interval is covered by one polygon, it is colored accordingly; if multiple, the closest surface (depth test) determines the color.
  • Depth Sorting (Painter's Algorithm): A hybrid approach where surfaces are sorted by decreasing depth and drawn from furthest to nearest.
  • Area Subdivision: An image-space approach that recursively divides an image into sub-regions until a region is simple enough to draw without depth testing; otherwise, it is subdivided down to the pixel level where depth is checked.

Light Sources and Illumination Models

Light sources include self-emitting sources (the sun, lamps) and reflective sources (the moon, mirrors). Background or ambient light is the result of light reflecting multiple times off surrounding objects from all directions before reaching the observed surface.

Surface intensity is determined by the properties of the incoming light and the material. Reflection occurs when light hits a surface and bounces back; refraction occurs when light travels through a boundary between media with different refractive indices, changing direction according to Snell's Law. Halftoning is a method used to display various light intensities on devices with limited color palettes by using patterns of dots.