Use the outline method to plot font boundaries, Computer Graphics

Assignment Help:

1. Use the outline method to plot the following font boundaries (style should remain the same). Implement your method in C language. 

 

124_Use the outline method to plot font boundaries.png

ANswer: Here letter G is produced using linear segments for outline method.  You may also use Bezier curves of higher degree to approximate the outline of the character. The outline will be drawn using the code given here. For filling the interior, you need to employ one of the fill area methods.   Vertices of the line segments are given as follows. 

GLint vt[][2]={{315,245}, { 315,195}, {316,190},{333,183},

{ 251,183}, {263,186}, { 270, 190},{272,195}, {272,225}, {

253, 238}, {242,236}, {235,229}, {231,219}, {227,198}, {

227,169}, { 228,152}, {233,133}, {242,124}, {248,120}, {

253,120}, {269,119}, { 273,121}, { 280,126}, {292,134}, {

299,141}, {305,149}, {312,162}, {312,111}, {307,110}, {307,

120}, {304, 130}, {301, 133}, {298, 131}, { 289, 125},

{279, 120}, {266, 113}, {251, 109}, {239, 110},{229,110},

{219,114}, {208,120}, {196,129}, {190,138}, {185,148},

{181, 158}, {180,172},{180,184}, {180,196}, {184, 203},

{189, 214}, {198, 226}, {211, 235}, {220,242}, {230,245},

{245,247}, {260, 247}, {271, 241}, {284, 236}, {293, 231},

{299, 231}, {306, 235}, {315,245}}; 

The code uses simple line loop to produce the character.   

void lineG(void)

{glBegin(GL_LINE_LOOP);

for(int i = 0;i<62;i++) {

 vt[i][1]=480-vt[i][1];

 glVertex2iv(vt[i]);}

 glEnd();

}  

Call the function lineG in your display function. Similar is the code for letter ' t'.


Related Discussions:- Use the outline method to plot font boundaries

What is a dot size and interdot distance, What is a dot size and interdot d...

What is a dot size and interdot distance? Dot size may be explained as the diameter of a single dot on the devices output. Dot size is also known as the Spot size.  Interdo

Important point about the de casteljeau algorithm, Important point about th...

Important point about the De casteljeau algorithm 1)      Bezier Curve: P (u) =    ................     (1) Here B n,i (u) = n c i u i (1 - u) n-i        ..

Mpeg-2 , MPEG-2 : MPEG-2 that is Moving Picture Experts Group format 2 is ...

MPEG-2 : MPEG-2 that is Moving Picture Experts Group format 2 is the standard used through DVD and is of a much higher quality than MPEG- 1. This format gives for 720 x 480 resolu

Raster scan display processor, Draw the block diagram of raster scan displa...

Draw the block diagram of raster scan display processor.

Dda, differentiate between dda and bresenhams line algorithm

differentiate between dda and bresenhams line algorithm

Demerit - phong shading or normal vector interpolation shadi, Demerit - pho...

Demerit - phong shading or normal vector interpolation shading Needs lot of computations to determine intensity at a point, hence increases the cost of shading in any impleme

Specular reflection - polygon rendering & ray tracing method, Specular Refl...

Specular Reflection - Polygon Rendering & Ray Tracing Methods Specular reflection is while the reflection is stronger in one viewing direction that is a bright spot, termed

Potentially entering and leaving points - clipping, Potentially entering an...

Potentially entering and leaving points - P E and P L The intersection point of the line and window might be classified either like potentially leaving or entering. Before g

Uncompressed and common audio format, Uncompressed / Common Audio Format ...

Uncompressed / Common Audio Format There is one main uncompressed audio format: PCM. It is generally stored like a .wav on Windows. WAV is file format which is flexible and des

Region filling, what is region filling? give details

what is region filling? give details

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd