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

Functions available in animation packages, Functions Available in Animation...

Functions Available in Animation Packages Some broad functions available in animation packages are as: Object Function to manage and store the object database , where

Can you give some basic features of computer graphics, Can you give some ba...

Can you give some basic features of computer graphics? The methods of computer graphics are the manipulation and creation of graphics (artificial images) by computer.

Lossless audio formats, Lossless Audio Formats: Lossless audio formats as ...

Lossless Audio Formats: Lossless audio formats as TTA and FLAC give a compression ratio of around 2:1, sometimes extra. During exchange, for their lower compression ratio, such co

Parallel projection - viewing transformation, Parallel Projection - viewing...

Parallel Projection - viewing transformation Parallel projection methods are utilized by engineers to make working drawings of an object that preserves its true shape. In t

Concept of area subdivision method, Q.   Explain the concept of area subdiv...

Q.   Explain the concept of area subdivision method. Write the conditions, when no further subdivision is needed and how we can test these condition. Ans. Area Subdivision Th

Three sub-fields of computer simulation, Three Sub-Fields of Computer Simul...

Three Sub-Fields of Computer Simulation Computer simulation is the electronic equivalent of this kind of role playing and it functions to drive synthetic environments and virt

Alias wavefront - softwares for computer animation, Alias Wavefront - Softw...

Alias Wavefront - Softwares for Computer Animation Alias is one of the highest computer animation packages out there. Alias was formed by the company which used to be Alias, a

File formats that are used for vector data, File Formats that are used for ...

File Formats that are used for Vector Data This data can be saved in a wide variety of file formats are as: •EPS: the most well-accepted file format to exchange vector dra

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