Download presentation
Presentation is loading. Please wait.
Published byBritney Ford Modified over 9 years ago
1
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 1 Attributes of Output Primitives Definition Parameter that affects the way a primitive will be displayed Line Attribute. Type. Width. Color. Pen & Brush
2
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 2 Line Attribute 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. Ex. 111100011110001111 Note : Fixed pixel with dashes can produce unequal length dashes. It depend on line orientation. So, need to adjust the number of plotted pixels for different slopes.
3
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 3 Line Attribute Width. Specify in pixels and proportion of a standard line width.. Thicker line can be produced by.. Adding extra pixel vertically when |m| < 1. Adding extra pixel horizontally when |m| > 1. Issues:. Line have different thickness on the slope. Problem with. End of the line. Joining the two lines (polygon)
4
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 4 Attributes of Output Primitives
5
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 5 Attributes of Output Primitives
6
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 6 Line Attribute Pen and Brush. The selected “pen” or “brush” determine the way a line will be drawn.. Pens and brushes have size, shape, color and pattern attribute.. Pixel mask is applied in both of them.
7
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 7 Curve Attribute Similar to line : type + width Thicker curves can be produced by: 1. Plotting additional pixel 2. Filling the space between two concentric circles. 3. Using thicker pen or brush
8
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 8 COLOR AND GRAY SCALE LEVEL Color Colors are represented by colors codes which are positive integers. Color information is stored in frame buffer or in separate table and use pixel values as index to the color table. Two ways to store color information : 1. Direct 2. Indirect
9
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 9 COLOR Direct
10
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 10 COLOR Indirect
11
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 11 COLOR Exercise: What is the size of frame buffer required for the following cases: Case 1 (Direct): Resolution of 1024 * 1024 with 24 bits per pixel pixel Case 2 (Indirect): Same resolution with 8 bit per pixel that indexed out of 16 million available colors indexed out of 16 million available colorsConclusion CLUT is good for storage but cant give a very high resolution picture.
12
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 12 GRAY SCALE LEVEL.Apply for monitor that have no color.Shades of grey (white->light grey->dark grey->black).Color code mapped onto grayscale codes.2 bits can give 4 level of grayscale.8 bits per pixel will allow 256 combination.Dividing the actual code with 256 will give range of 0 and 1 Ex: Color code in color display is 118 To map to nearest grayscale then 118/256 = 0.45 light gray ScaleShade 1black 0.66 Dark grey 0.33 Light Grey 0White
13
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 13 AREA FILLED ATTRIBUTE. Option for filling a defined region is whether solid, pattern and colors. Fill Styles. Three basic fill styles are:. hollow with color border.. interior color is same with background
14
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 14 AREA FILLED ATTRIBUTE. filled with a solid color.. color up to and including the border pattern.. control by other table
15
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 15 AREA FILLED ATTRIBUTE. Color-Blended Fill Region -Soft-fill -Tint-fill P = tF + (1-t)B where 0 < t < 1 If t < 0.5, background color contributes more to the interior color of the region than does the fill color.
16
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 16 Filled-Area Primitives Filled-Area Primitives
17
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 17 Filled-Area Primitives Filled-Area Primitives
18
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 18 Filled-Area Primitives Filled-Area Primitives
19
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 19 Filled-Area Primitives Filled-Area Primitives
20
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 20 Filled-Area Primitives Filled-Area Primitives
21
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 21 Filled-Area Primitives Filled-Area Primitives
22
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 22 Filled-Area Primitives Filled-Area Primitives
23
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 23 Filled-Area Primitives Filled-Area Primitives Some special need handling on polygons intersection. - Where vertex is the meeting point of two edges. - If the two edges of vertex is on the same side – filling is no problem. - If the two edges are on the opposite site – will cause some filling problem Refer tp page 198 (Hearn and Baker)
24
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 24 Filled-Area Primitives Filled-Area Primitives Some special need handling on polygons intersection. Solution - Shorten the pixel so the two edges do not meet. - If the value of y is decreasing then y coordinate of the upper endpoint of the edge following current edges. - If the value of y is increasing then, value of y of the upper endpoint for the current edges is decreased by 1.
25
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 25 Filled-Area Primitives Filled-Area Primitives
26
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 26 Filled-Area Primitives Filled-Area Primitives
27
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 27 Filled-Area Primitives Filled-Area Primitives
28
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 28 Filled-Area Primitives Filled-Area Primitives
29
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 29 Filled-Area Primitives Filled-Area Primitives
30
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 30 Filled-Area Primitives Filled-Area Primitives
31
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 31 Filled-Area Primitives Filled-Area Primitives
32
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 32 Filled-Area Primitives Filled-Area Primitives
33
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 33 Filled-Area Primitives Filled-Area Primitives
34
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 34 Filled-Area Primitives Filled-Area Primitives
35
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 35 Filled-Area Primitives Filled-Area Primitives
36
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 36 Filled-Area Primitives Filled-Area Primitives
37
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 37 Filled-Area Primitives Filled-Area Primitives
38
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 38 Filled-Area Primitives Filled-Area Primitives
39
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 39 Filled-Area Primitives Filled-Area Primitives
40
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 40 Pattern Fill Ex: Table with two dimensional array of color codes. Index 1: Cpa[1,1] = 4 Cpa[2,2] = 4 | 4 0 | Cpa[1,2] = 0 | 0 4 | Cpa[2,1] = 0 Index 2: Cpb[1,1] = 4 Cpb[2,2] = 4 | 4 6 4 | Cpb[3,3] = 4 | 6 4 6 | Cpb[1,2] = 6 | 4 6 4 | Cpb[2,1] = 6 Cpb[2,3] = 6 Cpb[1,3] = 4 Cpb[3,1] = 4 Cpb[3,3] = 4
41
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 41 Pattern Fill So to set the pattern: ex command is SetPatternRepresentation (ws,pi,nx,ny,cp) Wherews is polygon edges pi is set the pattern index cp is a 2-dimensional array color code of nx and ny..Filling an area with rectangular pattern is called tiling..Some pattern been generated based on and, or, xor, replace logic which result based on the foreground and background color..Soft Fill is a method where factor is given in order to control the transparency of background and foreground P = tF+(1-t)B
42
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 42 Bundled Attributes When each function reference a single attribute that specify exactly how primitive to be displayed ; then its called individual (unbundled attribute)..Bundled attributes is where a set of attributes value can be chosen by specifying the appropriate index table..The table for each primitive that defines group of attribute values is called bundled table..Attribute that can be bundled are:. Bundled Line Attribute. Bundled Area-Fill Attribute. Bundled Text Attribute. Bundled Marker Attribute
43
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 43 ANTIALIASING
44
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 44 ANTIALIASING
45
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 45 ANTIALIASING
46
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 46 ANTIALIASING
47
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 47 ANTIALIASING This distortion is due to low-frequency sampling and it is called aliasing..To improve the appearance is called antialiasing method..The straight line. circle and ellipse drawing algorithms have to decide which pixel are closest to line..Scan conversion samples a line and choose which of the much smaller number of pixel on the screen to plot to represent a line.
48
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 48 ANTIALIASING Increasing Screen Resolution
49
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 49 ANTIALIASING Supersampling
50
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 50 ANTIALIASING
51
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 51 ANTIALIASING
52
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 52 ANTIALIASING
53
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 53 ANTIALIASING
54
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 54 ANTIALIASING
55
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 55 ANTIALIASING
56
© 2001 By Default! A Free sample background from www.pptbackgrounds.fsnet.co.uk Slide 56 ANTIALIASING
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.