CGMB214: Introduction to Computer Graphics

Slides:



Advertisements
Similar presentations
Images Images are a key component of any multimedia presentation.
Advertisements

Line Drawing Algorithms. Rasterization-Process of determining which pixels give the best approximation to a desired line on the screen. Scan Conversion-Digitizing.
Chapter 3 Drawing and Composing an Illustration. Objectives Draw straight lines Draw curved lines Draw elements of an illustration Apply attributes to.
In the name of God Computer Graphics Bastanfard.
CS 551 / CS 645 Antialiasing. What is a pixel? A pixel is not… –A box –A disk –A teeny tiny little light A pixel is a point –It has no dimension –It occupies.
© 2001 By Default! A Free sample background from Slide 1 Attributes of Output Primitives Definition Parameter that affects.
Output Primitives Computer Graphics.
CMPE 466 COMPUTER GRAPHICS
CST 494/598 Computer Graphics Anshuman Razdan i3dea.asu.edu/razdan.
Graphics Output Primitives Pixel Addressing and Fill Area Dr. M. Al-Mulhem Feb. 1, 2008.
1 King ABDUL AZIZ University Faculty Of Computing and Information Technology CS 454 Computer graphicsIntroduction Dr. Eng. Farag Elnagahy
Vector vs. Bitmap SciVis V
V Obtained from a summer workshop in Guildford County July, 2014
Adobe Illustrator CS2 — Revealed GRADIENTS CREATING TEXT AND.
March Shape Drawing Algorithms Shmuel Wimer Bar Ilan Univ., Engineering Faculty.
Higher Computing Data Representation.
Geometric Objects Computer Graphics Lab. Sun-Jeong Kim.
Dr. S.M. Malaek Assistant: M. Younesi
Objective Understand concepts used to create digital graphics. Course Weight : 15% Part Three : Concepts of Digital Graphics.
Tools for Raster Displays CVGLab Goals of the Chapter To describe pixmaps and useful operations on them. To develop tools for copying, scaling, and rotating.
CGMB214: Introduction to Computer Graphics
Vector vs. Bitmap
Graphics Graphics Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 1. Data Representation Data Representation – Why do we use binary? simplicity,
Graphics A graphics program allows you to combine pictures and text in many different ways. Features – General Level Draw graphics Enter Text Common Tools.
10/26/04© University of Wisconsin, CS559 Fall 2004 Last Time Drawing lines Polygon fill rules Midterm Oct 28.
Color and Resolution Introduction to Digital Imaging.
1 Introduction Line attribute Color and gray scale Area filled attribute Anti-aliasing.
Introduction to Interactive Media Interactive Media Components: Text.
Character Generation.
CGMB214: Introduction to Computer Graphics
INT 840E Computer graphics Introduction & Graphic’s Architecture.
2D Output Primitives Points Lines Circles Ellipses Other curves Filling areas Text Patterns Polymarkers.
Desktop Publishing Review. What is a rough sketch used in planning a layout and design?
Vector Graphics Digital Multimedia Chap 이병희
1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized.
Digital Media Dr. Jim Rowan ITEC So far… We have compared bitmapped graphics and vector graphics We have discussed bitmapped images, some file formats.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
Attributes of Graphics Primitives Hearn & Baker Chapter 4 Some slides are taken from Robert Thomsons notes.
GEOMETRY AND LINE GENERATION Geometry and Line Generation Chapter 2.
In the name of God Computer Graphics. Today Introduction Sampling Graphic Output Primitives 1.Line 2.Circle 3.Curve 4.polygon.
Digitization Informatics INFO I101 January 26, 2004 John C.Paolillo.
2D Output Primitives Points Lines Circles Ellipses Other curves Filling areas Text Patterns Polymarkers.
© ExplorNet’s Centers for Quality Teaching and Learning 1 Objective % Understand concepts used to create digital graphics.
Guilford County SciVis V104.03
CS552: Computer Graphics Lecture 17: Scan Conversion (Special Cases)
OUTPUT PRIMITIVES A.Aruna/Faculty of Information technology/SNSCE13/19/2016.
Attributes of Graphics Primitives Chapter 4
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.
ATTRIBUTE OF OUTPUT PRIMITIVES. Attribute of Output Primitives 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 2 Definition Line Attribute Curve Attribute.
Graphics Basic Concepts 1.  A graphic is an image or visual representation of an object.  A visual representation such as a photo, illustration or diagram.
Main characteristics of Vector graphics  Vector graphics provide an elegant way of constructing digital images (diagrams, technical illustration and.
Vector vs. Bitmap. Vector Images Vector images (also called outline images) are images made with lines, text, and shapes. Test type is considered to be.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.
Objective % Explain design concepts used to create digital graphics.
Pattern filling in scan-conversion Antialiasing
Attributes of Graphics Primitives Hearn & Baker Chapter 4
Everything is a number Everything in a computer memory and on storages is a number. Number  Number Characters  Number by ASCII code Sounds  Number.
Binary Notation and Intro to Computer Graphics
Vector vs. Bitmap.
Adobe Flash Professional CS5 – Illustrated
Fill and Stroke Stroke is the outline of a shape, text or image.
Graphic Editing Terms Cropping
Chapter Lessons Use the Macromedia Flash drawing tools
o عَلَّمَهُ الْبَيَانَ
Primitive Drawing Algorithm
Primitive Drawing Algorithm
Objective % Explain design concepts used to create digital graphics.
Presentation transcript:

CGMB214: Introduction to Computer Graphics Topic 5 Attributes of Graphics Primitives

Objectives To understand the characteristic of a primitive

Color and Gray Scale

Color and Gray Scale Color – A basic attribute for all primitives Various color option depend on capabilities and design objectives of a particular system

RGB Color Components In color raster system (monitor) Number of color choices available depends on the amount of storage provided per pixel in the frame buffer Two method of storing color information in the frame buffer Directly – storing RGB color code directly in the frame buffer Indirectly – put the color codes into a separate table and use the pixel locations to store index values referencing the color-table entries

Stored Color Values in Frame Buffer RGB Color Components Color Code Stored Color Values in Frame Buffer Displayed Color RED GREEN BLUE Black 1 Blue 2 Green 3 Cyan 4 Red 5 Magenta 6 Yellow 7 White

RGB Color Components For 24 bit color For 15 bit colors Store 8 bits each of red, green and blue perpixel E.g (255,0,0) is pure red and (255,255,255) is white Yields 224 = 16 mill colors For 15 bit colors 5 bit red+5 bit green+5 bit blue The video hardware uses the value to drive the R,G and B guns 255

RGB Color Components Disadvantage Solution As more color options are provided, the storage required for the frame buffer also increases 1024 x 1024 full color (24-bit per pixel) RGB system needs 3MB of storage for the frame buffer Solution Storing the color values in a color lookup table (color map)

Color Tables

Color Tables Values stored in the frame buffer are now used as indices into the color table Advantages Reduce the frame-buffer storage requirement to 1MB Table entries can be change at any time, allowing a user to be able to experiment easily with different color combinations without changing the attribute setting for the graphics data structure When a color value in the color table is changed, all pixels with that color index will change to the new color Without color table, we can only change the color of a pixel by storing the new color at that frame buffer location

Point

Point Attributes Two attributes of point Color Set with RGB values or an index into a color table Size An integer multiple of the pixel size Large point is displayed as a square block of pixels

Line

Line Attributes Basic attributes Special effects for lines Color Set with the same function for all graphics primitives (using RGB values) Width Define with separate line functions Style Special effects for lines Pen Brush Strokes

Line Width A standard width line is generated with single pixels at each sample position Thicker lines are displayed as positive integer multiplies of the standard line Methods If line slope magnitude ≤ 1.0 use vertical span Plotting a vertical span of pixels in each column (x position) along the line. If line slope magnitude > 1.0 use horizontal span Plotting a pixels to the right and left of the line path.

Line Width Advantage vertical/horizontal span pixel Disadvantage Quick to generate the thick line Disadvantage The displayed width of a line is dependent to its slope i.e. 45 degree line will displayed thinner compare to vertical and horizontal line The line ends are horizontal or vertical regardless of the slope of the line Solution Adjust the shape of the line ends to give them a better appearance

Shape of the Line Ends Square ends that are perpendicular to the line path Line ends are added with a filled semi circle. Centered at the middle of the thick line. Diameter = the line thickness Extend the line and add butt caps that are positioned ½ of the line width

Line Width Other approach producing a thick line Displaying the line as a filled rectangle Generating the line with a selected pen or brush

Smooth Connection Line Segment Method discussed will not produce a smoothly connected series of line segments It leaves pixels gaps at boundary between line segments with different slope where there is a shift from horizontal pixel spans to vertical pixel spans Additional processing at the segment endpoints is required to solve the problem

Smooth Connection Line Segment 3 possible methods for smoothly joining 2 line segments Extending the outer boundaries of each of the two line segments until they meet Capping the connecting between two segments with a circular boundary whose diameter = line width Displaying the line segments with butt caps and filling in the triangular gap where the segments meet

Line Style Type Solid Dotted – very short dash with spacing equal to or greater than dash itself Dashed – displayed by generating an interdash spacing Pixel count for the span and interspan length is specified by the mask E.g. 111100011110001111 Note: fixed pixel with dashes can produce unequal length dashes. It depends on line orientation. So need to adjust the number of plotted pixel for different slopes

Pen and Brush The selected “pen” or “brush” determine the way a line will be drawn Pens and brushes attributes are size, shape, color and pattern Pixel mask is applied in both of them

Curve Attributes Similar to line: type + width Thicker curve can be produced by Plotting additional pixel Filling the space between two concentric circles Using thicker pen or brush

Character

Character Attributes We control the appearance of displayed character with attributes such as Font size Color Orientation

Character Attributes Text-display option Typeface – choice of font Set of character with a particular design i.e. courier, helvetica, times roman etc. Assorted underlining styles Solid, dotted, double Boldface Italic Emboss Shadow style

Character Attributes Color settings Can be stored in the system attribute list and used by the procedures that generate character definition in the frame buffer Current color is used to set pixel values in the frame buffer corresponding to the character shapes and position

Character Attributes Text size By scaling the overall dimensions of character Height Width Or scaling the height only Or scaling the width only

Character Attributes Orientation Set according to the direction of a character up vector Orientation of character from baseline to capline is in the direction of up vector Set using text-path orientation Arrange the character strings vertically or horizontally or forward or backward Adjust the position of the individual characters in the frame buffer according to the option selected Combination of up-vector and text-path to produce slanted text

Character Attributes Other attributes Character spacing Spacing between character Alignment How text is to be displayed with respect to a reference position Align according to the base line Align according to the character center Text-precision attribute (in some graphics packages) Specify the amount of detail and the particular processing options that are to be used with the text string Special character

Antialiasing

Antialiasing A methods that compensate for the undersampling process (aliasing) Aliasing Is a distortion of information due to low-frequency sampling (under-sampling) The sampling process digitizes coordinate points on an object to discrete integer pixel position Resulting A jagged, or stair-step appearance

Antialiasing

Antialiasing One way to increase sampling rate with raster system Simply to display objects at higher resolution Even with highest resolution, the jaggies still apparent to some extent So it is not a complete solution Other antialising method may be applied

Antialiasing Methods Supersampling Straight Line Segments Divide each pixel into a number of subpixels and count the number of subpixels that overlap the line path. The intensity level is for each pixel is then set to a value that is proportional to this subpixel count. Involve computing intensities at subpixel grid position, then combine the results to obtain the pixel intensities Area sampling (prefiltering) Determine pixel intensity by calculating the areas of overlap of each pixel with the object to be displayed Pixel phasing Shifting the display location of pixel areas Applied by “micropositioning” the electron beam in relation to object geometry Filtering techniques (postfiltering) More accurate method for antialiasing lines Methods similar to applying a weighted pixel mask, but now we imagine a continuous weighting surface covering the pixel Antialiasing Area Boundary Applying an antialiasing concepts for boundaries area

References http://www.gamegen.com.br/