Intro to Computer Graphics & OpenGL: Coord Frames, Point/Line Funcs, Circle Gen., Study Guides, Projects, Research of Computer Graphics

An introduction to computer graphics and opengl, focusing on coordinate frames, point and line functions, and circle generation. The basics of opengl, including specifying two-dimensional world coordinate reference frames, opengl point and line functions, point and line attributes, curve attributes, and line drawing algorithms. The document also discusses applications of computer graphics, such as graphs and charts, computer art, and television programs.

Typology: Study Guides, Projects, Research

2023/2024

Available from 03/24/2024

star_score_grades
star_score_grades 🇺🇸

3.7

(21)

1.6K documents

1 / 70

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Module 1 Computer Graphics and OpenGL
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
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46

Partial preview of the text

Download Intro to Computer Graphics & OpenGL: Coord Frames, Point/Line Funcs, Circle Gen. and more Study Guides, Projects, Research Computer Graphics in PDF only on Docsity!

Module 1 Computer Graphics and OpenGL

s

1. Overview: Computer Graphics and OpenGL

Basics of computer graphics Application of Computer Graphics, Video Display Devices Random Scan and Raster Scan displays, Color CRT monitors, 1.3.4 Flat panel displays. Raster- scan systems: Video controller, Raster scan Display processor, Graphics workstations and viewing systems, Input devices, Graphics networks, Graphics on the internet, Graphics software. OpenGL: Introduction to OpenGL , Coordinate reference frames, Specifying two-dimensional world coordinate reference frames in OpenGL, OpenGL point functions, OpenGL line functions, point attributes, Line attributes, Curve attributes, OpenGL point attribute functions, OpenGL line attribute functions, Line drawing algorithms(DDA, Bresenham’s), Circle generation algorithms

(Bresenham’s).

1.1 Basics of Computer Graphics

Computer graphics is an art of drawing pictures, lines, charts, etc. using computers with the help of programming. Computer graphics image is made up of number of pixels. Pixel is the smallest addressable graphical unit represented on the computer screen.

s

1.2 Applications of Computer Graphics

a. Graphs and Charts  An early application for computer graphics is the display of simple data graphs usually plotted on a character printer. Data plotting is still one of the most common graphics application.  Graphs & charts are commonly used to summarize functional, statistical, mathematical, engineering and economic data for research reports, managerial summaries and other types of publications.  Typically examples of data plots are line graphs, bar charts, pie charts, surface graphs, contour plots and other displays showing relationships between multiple parameters in two dimensions, three dimensions, or higher-dimensional spaces b. Computer-Aided Design  A major use of computer graphics is in design processes-particularly for engineering and architectural systems.

s  CAD, computer-aided design or CADD, computer-aided drafting and design methods are now routinely used in the automobiles, aircraft, spacecraft, computers, home appliances.  Circuits and networks for communications, water supply or other utilities are constructed with repeated placement of a few geographical shapes.  Animations are often used in CAD applications. Real-time, computer animations using wire-frame shapes are useful for quickly testing the performance of a vehicle or system. c. Virtual-Reality Environments  Animations in virtual-reality environments are often used to train heavy-equipment operators or to analyze the effectiveness of various cabin configurations and control placements.  With virtual-reality systems, designers and others can move about and interact with objects in various ways. Architectural designs can be examined by taking simulated “walk” through the rooms or around the outsides of buildings to better appreciate the overall effect of a particular design.  With a special glove, we can even “grasp” objects in a scene and turn them over or move them from one place to another. d. Data Visualizations  Producing graphical representations for scientific, engineering and medical data sets and processes is another fairly new application of computer graphics, which is generally referred to as scientific visualization. And the term business visualization is used in connection with data sets related to commerce, industry and other nonscientific areas.

s f. Computer Art  The picture is usually painted electronically on a graphics tablet using a stylus, which can simulate different brush strokes, brush widths and colors.  Fine artists use a variety of other computer technologies to produce images. To create pictures the artist uses a combination of 3D modeling packages, texture mapping, drawing programs and CAD software etc.  Commercial art also uses theses “painting” techniques for generating logos & other designs, page layouts combining text & graphics, TV advertising spots & other applications.  A common graphics method employed in many television commercials is morphing, where one object is transformed into another. g. Entertainment  Television production, motion pictures, and music videos routinely a computer graphics methods.  Sometimes graphics images are combined a live actors and scenes and sometimes the films are completely generated a computer rendering and animation techniques.

s  Some television programs also use animation techniques to combine computer generated figures of people, animals, or cartoon characters with the actor in a scene or to transform an actor’s face into another shape. h. Image Processing  The modification or interpretation of existing pictures, such as photographs and TV scans is called image processing.  Methods used in computer graphics and image processing overlap, the two areas are concerned with fundamentally different operations.  Image processing methods are used to improve picture quality, analyze images, or recognize visual patterns for robotics applications.  Image processing methods are often used in computer graphics, and computer graphics methods are frequently applied in image processing.  Medical applications also make extensive use of image processing techniques for picture enhancements in tomography and in simulations and surgical operations.  It is also used in computed X-ray tomography(CT), position emission tomography(PET),and computed axial tomography(CAT). i. Graphical User Interfaces  It is common now for applications software to provide graphical user interface (GUI).  A major component of graphical interface is a window manager that allows a user to display multiple, rectangular screen areas called display windows.

s  A beam of electrons, emitted by an electron gun, passes through focusing and deflection systems that direct the beam toward specified positions on the phosphor-coated screen.  The phosphor then emits a small spot of light at each position contacted by the electron beam and the light emitted by the phosphor fades very rapidly.  One way to maintain the screen picture is to store the picture information as a charge distribution within the CRT in order to keep the phosphors activated.  The most common method now employed for maintaining phosphor glow is to redraw the picture repeatedly by quickly directing the electron beam back over the same screen points. This type of display is called a refresh CRT.  The frequency at which a picture is redrawn on the screen is referred to as the refresh rate. Operation of an electron gun with an accelarating anode  The primary components of an electron gun in a CRT are the heated metal cathode and a control grid.  The heat is supplied to the cathode by directing a current through a coil of wire, called the filament, inside the cylindrical cathode structure.  This causes electrons to be “boiled off” the hot cathode surface.  Inside the CRT envelope, the free, negatively charged electrons are then accelerated toward the phosphor coating by a high positive voltage.

s  After a short time, the “excited” phosphor electrons begin dropping back to their stable ground state, giving up their extra energy as small quantum of light energy called photons.  What we see on the screen is the combined effect of all the electrons light emissions: a glowing spot that quickly fades after all the excited phosphor electrons have returned to their ground energy level.  The frequency of the light emitted by the phosphor is proportional to the energy difference between the excited quantum state and the ground state.  Lower persistence phosphors required higher refresh rates to maintain a picture on the screen without flicker.  The maximum number of points that can be displayed without overlap on a CRT is referred to as a resolution.  Resolution of a CRT is dependent on the type of phosphor, the intensity to be displayed, and the focusing and deflection systems.  High-resolution systems are often referred to as high-definition systems.

s 1.3.1 Raster-Scan Displays and Random Scan Displays i) Raster-Scan Displays  The electron beam is swept across the screen one row at a time from top to bottom.  As it moves across each row, the beam intensity is turned on and off to create a pattern of illuminated spots.  This scanning process is called refreshing. Each complete scanning of a screen is normally called a frame.  The refreshing rate, called the frame rate, is normally 60 to 80 frames per second, or described as 60 Hz to 80 Hz.  Picture definition is stored in a memory area called the frame buffer.  This frame buffer stores the intensity values for all the screen points. Each screen point is called a pixel (picture element).  Property of raster scan is Aspect ratio, which defined as number of pixel columns divided by number of scan lines that can be displayed by the system. Case 1: In case of black and white systems  On black and white systems, the frame buffer storing the values of the pixels is called a bitmap.  Each entry in the bitmap is a 1-bit data which determine the on (1) and off (0) of the intensity of the pixel.

Module 1 Computer Graphics and OpenGL  Refresh rate on a random-scan system depends on the number of lines to be displayed on that system.  Picture definition is now stored as a set of line-drawing commands in an area of memory referred to as the display list, refresh display file, vector file, or display program  To display a specified picture, the system cycles through the set of commands in the display file, drawing each component line in turn.  After all line-drawing commands have been processed, the system cycles back to the first line command in the list.  Random-scan displays are designed to draw all the component lines of a picture 30 to 60 times each second, with up to 100,000 “short” lines in the display list.  When a small set of lines is to be displayed, each refresh cycle is delayed to avoid very high refresh rates, which could burn out the phosphor. Difference between Raster scan system and Random scan system Base of Difference Raster Scan System Random Scan System Electron Beam The electron beam is swept across the screen, one row at a time, from top to bottom The electron beam is directed only to theparts of screen where a picture is to be drawn Resolution Its resolution is poor because raster system in contrast produces zigzag lines that are plotted as discrete point sets. Its resolution is good because this system produces smooth lines drawings because CRT beam directly follows the line path. Picture Definition Picture definition is stored as a set of intensity values for all screen points,called pixels in a refresh buffer area. Picture definition is stored as a set of line drawing instructions in a display file. Realistic Display The capability of this system to store intensity values for pixel makes it well suited for the realistic display of scenes These systems are designed for line-drawing and can’t display realistic shaded scenes.

Module 1 Compute r Graphic s and OpenGL contain shadow and color pattern. Screen points/pixels are used Draw an Image to draw an image Mathematical fu draw an image nction s are used to Color CRT Monitors  A CRT monitor displays color pictures by using a combination of phosphors that emit different-colored light.  It produces range of colors by combining the light emitted by different phosphors.  There are two basic techniques for color display:

  1. Beam-penetration technique
  2. Shadow-mask technique 1) Beam-penetration technique:  This technique is used with random scan monitors.  In this technique inside of CRT coated with two phosphor layers usually red and green.  The outer layer of red and inner layer of green phosphor.  The color depends on how far the electron beam penetrates into the phosphor layer.  A beam of fast electron penetrates more and excites inner green layer while slow eletron excites outer red layer.  At intermediate beam speed we can produce combination of red and green lights which emit additional two colors orange and yellow.  The beam acceleration voltage controls the speed of the electrons and hence color of pixel. Disadvantages:  It is a low cost technique to produce color in random scan monitors.  It can display only four colors.  Quality of picture is not good compared to other techniques. 2) Shadow-mask technique  It produces wide range of colors as compared to beam-penetration technique.  This technique is generally used in raster scan displays. Including color TV.

s  In this technique CRT has three phosphor color dots at each pixel position.  One dot for red, one for green and one for blue light. This is commonly known as Dot triangle.  Here in CRT there are three electron guns present, one for each color dot. And a shadow mask grid just behind the phosphor coated screen.  The shadow mask grid consists of series of holes aligned with the phosphor dot pattern.  Three electron beams are deflected and focused as a group onto the shadow mask and when they pass through a hole they excite a dot triangle.  In dot triangle three phosphor dots are arranged so that each electron beam can activate only its corresponding color dot when it passes through the shadow mask.  A dot triangle when activated appears as a small dot on the screen which has color of combination of three small dots in the dot triangle.  By changing the intensity of the three electron beams we can obtain different colors in the shadow mask CRT. 1.3.3Flat Panel Display  The term flat panel display refers to a class of video device that have reduced volume, weight & power requirement compared to a CRT.  As flat panel display is thinner than CRTs, we can hang them on walls or wear on our wrists.

s  Since we can even write on some flat panel displays they will soon be available as pocket notepads.  We can separate flat panel display in two categories:

1. Emissive displays : - the emissive display or emitters are devices that convert electrical energy into light. For Ex. Plasma panel, thin film electroluminescent displays and light emitting diodes. 2. Non emissive displays: - non emissive display or non emitters use optical effects to convert sunlight or light from some other source into graphics patterns. For Ex. LCD (Liquid Crystal Display). a) Plasma Panels displays  This is also called gas discharge displays.  It is constructed by filling the region between two glass plates with a mixture of gases that usually includes neon.  A series of vertical conducting ribbons is placed on one glass panel and a set of horizontal ribbon is built into the other glass panel.  Firing voltage is applied to a pair of horizontal and vertical conductors cause the gas at the intersection of the two conductors to break down into glowing plasma of electrons and ions.  Picture definition is stored in a refresh buffer and the firing voltages are applied to refresh the pixel positions, 60 times per second.