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

Softwares for computer animation, Software for computer animation Wh...

Software for computer animation Whether you might have the excellent hardware in the world, but without a high-quality software package, your hardware can act nothing. There

Interrupts - event driven devices, Interrupts - Event driven devices ...

Interrupts - Event driven devices Interrupts: An option to polling is the interrupt feature. The device sends an interrupt signal to the processor while an event happens. T

Character generation, What is character generation and explain it''s two me...

What is character generation and explain it''s two method: 1> Bitmap method 2> outline method.

Translation, Translation, Rotation and Scaling -  output primitives 1. ...

Translation, Rotation and Scaling -  output primitives 1. Two basic approaches used in character generation are - Bitmap method and outline method.  2. All 2D geometric tran

What is jpeg, Question 1 What is JPEG? How do you change the quality of a ...

Question 1 What is JPEG? How do you change the quality of a JPEG image? Question 2 What are the advantages and challenges of virtual classroom? Question 3 What do

Low level techniques or motion specific, Low Level Techniques or Motion Spe...

Low Level Techniques or Motion Specific These techniques are utilized to control the motion of any graphic element in any animation scene completely. These techniques are also

What is the minimum amount of video ram, Consider a raster system with the ...

Consider a raster system with the resolution of 1024 x 768 pixels and the color palette calls for 65,536 colors. What is the minimum amount of video RAM that the computer must have

Morphing - key frame systems, Morphing - Key Frame Systems Transformati...

Morphing - Key Frame Systems Transformation of object shapes from one form to the other is termed as morphing as short form of metamorphism. This method can be applied to any o

Phong shading or normal vector interpolation shading, Phong shading OR Norm...

Phong shading OR Normal Vector Interpolation Shading In Gouraud shading we were doing direct interpolation of intensities although a more exact method for rendering a polygon

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