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

Polygon filling algorithm - raster graphics and clipping, Polygon Filling A...

Polygon Filling Algorithm - Raster Graphics and Clipping In several graphics displays, this becomes essential to differentiate between different regions by filling them along

Advantages of computer aided design, Advantages of Computer aided design  ...

Advantages of Computer aided design  -   It is simpler to modify drawings  -   A library of parts can be kept  -   Ability to do automatic costings -   Ability to mod

Properties of bezier curves - modeling and rendering, Properties of Bezier ...

Properties of Bezier Curves - modeling and rendering A very helpful property of a Bezier curve is that it always passes via the first and last control points. Such the bounda

Multimedia, Multimedia- It is a new aspect of literacy which is being recog...

Multimedia- It is a new aspect of literacy which is being recognized as technology expands the manner people communicate. The principle of literacy increasingly, is a measure of th

Explain the merits and demerits of plasma panel display, Explain the merits...

Explain the merits and demerits of Plasma panel display. Advantages: Refreshing is not needed. Produce a very steady image free of Flicker. Less bulky than a CRT.

Stochastic animation - computer animation, Stochastic Animation - Computer ...

Stochastic Animation - Computer Animation This utilizes stochastic processes that are a stochastic process can be identified as a random function. Such randomness could be in

Word perfect graphic, WPG: It is word perfect graphic file that is used vi...

WPG: It is word perfect graphic file that is used via Word Perfect. It first came out with the release of word perfect 5.0. Such files can include bitmaps, line arts and vector gr

3dstudio - softwares for computer animation, 3Dstudio - Softwares for compu...

3Dstudio - Softwares for computer animation 3DStudio is a 3-D computer graphics programmed. 3DStudio runs on personal computers. This is relatively simple to use. Several schoo

Principal vanishing point write respect to y-axis, Principal vanishing poin...

Principal vanishing point write respect to y-axis By the 2nd Row of the matrix as in Equation, the principal vanishing point w.r.t y-axis will as: (0, 5/√2, 0, 1/√2) in hom

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