Вы находитесь на странице: 1из 13

# CS602 - Computer Graphics

http://www.vustudents.net

FAQ

http://www.vustudents.net

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

What is meant by stencil buffer? A stencil buffer is an extra buffer+ in addition to the color buffer (pixel buffer and depth buffer (=(buffering found on modern computer graphics hardware. The buffer is per pixel+ and works on integer values+ usually with a depth of one byte per pixel. The depth buffer and stencil buffer often share the same area in the /A5 of the graphics hardware. What is the logic behind fractal geometry using in computer science? )f fractal is modern geometry than why we use euclidean geometry techni!ue? A fractal is generally .a rough or fragmented geometric shape that can be split into parts+ each of which is (at least approximately a reduced(si=e copy of the whole a property called self(similarity. The term was coined in 6?@A and was derived from the #atin fractus meaning .broken. or .fractured.. 1ractal is modern geometry and uses of fractal often has the following features, B )t has a fine structure at arbitrarily small scales. B )t is too irregular to be easily described in traditional language. B )t is self(similar (at least approximately or stochastically . B )t has a >ausdorff dimension which is greater than its topological dimension (although this re!uirement is not met by space(filling curves such as the >ilbert curve . B )t has a simple and recursive definition. 7ecause they appear similar at all levels of magnification+ fractals are often considered to be infinitely complex (in informal terms . Catural ob*ects that approximate fractals to a degree include clouds+ mountain ranges+ lightning bolts+ coastlines+ and snow flakes. >owever+ not all self(similar ob*ects are fractal for example+ the real line is formally self(similar but fails to have other fractal characteristics. What is difference between !uadratic and cubic parametric curves? "uadratic parametric curves re!uire three control pointD whereas cubic curves re!uires four control points. E. &bviously three control points can create less complex curvesD therefore !uadratic curves can have only one curvature because two control points represent the starting and ending pointD whereasD third control point in between control the curvature of the curve What is the main difference between 1orward -cattering and 7ack -cattering? 1orward scattering is the normal scattering of light after interacting with any surface but back scattering results only when the surface is very rough and irregular so the light is reflected back in the direction it comes. What is meant by 7lending? 7lending means how much the background and foreground colors are mixed+ for example if we set alpha value e!ual 6FFG than only front color is visible. What is perspective matrix? The perspective matrix is used to represent the actual point according to our monitor screen settings how we want to pro*ect that point on screen(perspective pro*ection . What is 1udge 1actor? 7y fudge factor we mean the value that will solve our problem and will help us in avoiding calculations so the term of ambient light we use is fudge factor. Hlease explain /adio(city 5ethod? /adio city method calculates the ambient light that will be emitted from different materials+ using scientific calculations. 9xplain about Attenuation 1actor? Attenuation factor mean%s how much light is attenuated after covering a certain distance d+ and it is given by the relation light intensity is directly proportional to 6IdE meaning light decreases as distance increases. )s Ambient in features are not prominent due to solid color?

Question:

http://www.vustudents.net

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

Ambient light is due to atmosphere and we assume in most cases that certain value of ambient light is present in the scene because for every point its calculation consumes a lot of time and computational cost. Hlease explain the )mpressive and )nteractive 40 9nvironment? 7y 40 we mean actual real time environment around us as you know our monitor screen is E0 (Without 0epth but we have to draw on it pictures that are real word (40 -o we have to use different techni!ues to create pictures that look like 40 in E0 monitor screen. )f all value of rgb is maximum in positive then we get White in other hand if we get rgb values in negative maximum then we get 7lack 2olor. Hlease guide. The basic idea is that white color reflects all rays on the other hand black color absorb all rays+ now it once again depend on graphics package used as some packages treat white as maximum rgb value and some treat black as maximum rgb value. 5aximum negative value is taken as minimum 5aximum positive value is taken as maximum )f we get the r value in negative then only r gets the dark impact on the ob*ect others values g and b in positive and these values are not getting the dark impact on the ob*ect. 9xplain 5aximum negative value has lower value as compared to lesser negative value+ also /ed color is more prominent than 7lue and Green. )s J color 5ode use in Hrinting and 4 color 5ode use for 5onitors or digital display? Co+ infact it is based on our graphics rendering engine we are using for example open gl supports J color mode but there are other engines that don%t support J color mode+ it doesn%t depend on the monitor or printer. What exactly do we mean by pipeline clipping approach? The basic concept here is that if we want to first check and than draw a polygon after clipping than the steps we take are, 2heck all the vertices of the polygon if they are inside of our clipping rectangle or not if they are out side than the intersection point in the path of that vertex is saved after all this we draw the polygon What is the rastering and what is different bIw raster and rastering line? /asteri=ation mean translating an image into pixels or raster lines. A /aster line is hori=ontal scan line which is used in filling algorithms. Triangle rasteri=ation is related to scan line. And we fill the triangle using the scan lines (/aster line . Why is the 7resenham%s line drawing algorithm more efficient than the 00A line drawing algorithm? 7resenhamKs algorithm uses integer arithmetic whereas the 00A uses floating point arithmeticD and as you know floating point arithmetic is much slower than integer arithmetic that is why 7resenhamKs algorithm is more efficient than 00A algorithm. What is the difference between bitmap graphics L vector graphics? )n vector graphics we use lines ( )n fact vectors to represent and store images so they have smaller si=e+ on the other hand in bitmap graphics we use pixels store and represent the image data. What is meant by /esolution? /esolution ()n bits is Co. of >ori=ontal pixels M Co of :ertical pixels M Co of bits used to represent per pixel. What is the basic difference bIw 1lat shading and Hhong shading? 1lat shading produce shading in a flat manner ()t produces constant shading

http://www.vustudents.net

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

everywhere on the ob*ect . )n Hhong shading we keep in mind the viewer position so in it the shading output produced is more natural and can represent shiny spots that are viewable from certain angles on reflecting ob*ect%s surfaces. Question: Answer: Question: Answer: >ow many colors are used in the image if C bits are re!uired to store a pixel? En colors will be stored per pixel. What is the difference between bitmap graphics L colored graphics? 7itmaps graphics store per pixel information. >ow much is the per pixel image information depends upon the image type for example the black and white need only one bit per pixel while colored image need N+ 6O+EJ bits per pixel. What are 9valuators? 9valuators are used to compute points on a curve or surface. 8sing them we can draw curves or surfaces. &ne dimensional evaluators are used to draw 2urves for example 7e=ier curve. Tow dimensional evaluators are used to draw -urfaces for example 7e=ier surface 9xplain what are .1/A2TA#-. L also their use in computer graphics? 1ractals 1ractal are geometric patterns that is repeated at ever smaller scales to produce irregular shapes and surfaces that can not be represented by classical geometry. 1ractals are used in computer modeling of irregular patterns and structure in nature. 8se of 1ractals, 1ractals are used to represent that kind of complex natural ob*ects that can not be represented by ordinary classical geometry. what is antialiasing? Antialiasing is a techni!ue for removing the non continuous irregular effects produced at the boundary (edges of different shapes due to smaller resolutions (7ig Hixel si=e . )n this techni!ue we change the color of some pixels surrounding the shape boundary so that the image look more natural and real. What is the opacity of the color? &pacity &pa!ue ob*ects does not allow the light to pass through them. 1or example Walls+ 5etals+ Wood+ and their this property is called opacity. &pacity and Transparency are converse to each other. Transparency is the measure of how much light that is passed through an ob*ect. What is hue? >ue is the measure of pureness of any color+ and saturation is the measure (amount of hue. What is local and global co(ordinate system? 9very thing in the real world is represented by x+ y+ = 2oordinates these are the global valus of these three variables. And within this world there are different ob*ects that have their own dimensions along x+ y+ = these values are for that particular ob*ect and represent only that ob*ect are called local coordinates of that particular ob*ect. >ow to improve performance of 7resenham line algorithms? -everal techni!ues can be used to improve the performance of line(drawing procedures. These are important because line drawing is one of the fundamental primitives used by most of the other rendering applications. An improvement in the speed of line(drawing will result in an overall improvement of most graphical applications. /emoving procedure calls using macros or inline code can produce improvements. 8nrolling loops also may produce longer pieces of code+ but these may run faster. The use of separate x and y coordinates can be discarded in favour of direct frame buffer addressing. What is the concept behind clipping?

Question:

http://www.vustudents.net

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

http://www.vustudents.net

"

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

>ow can rendering be elaborated in 40 2omputer Graphics? /endering is all about simulating the real world as much as possible. )f you are rendering something sitting on your table+ think about everything that is going on in the room. What is around the ob*ect? Where is the light coming from? )s there light coming from different places around the room? >ow bright is it? What color is the light? What do the shadows look like? What is reflecting in the ob*ect? What kinds of highlights are on the ob*ect? All of these things are the result of lighting and the environment. Covice users often don%t take the time to consider these things and then try to replicate them. )t%s no wonder most beginners% renderings don%t look very good. What is 0iffuse /eflection? The ideal diffuse reflector (or #ambertian reflector , )ncident light is reflected with e!ual intensity in all directions+ regardless of viewing position. >ow much light is reflected depends on the ;reflectiveness< of the surface. A highly reflective surface reflects most of the light. What is -pecular /eflection? -pecular reflection is for shiny ob*ects )n contrast to diffuse reflection+ specular reflection is not constant at all angles from the surface. What is Attenuation? Attenuate means ;to weaken<. #ight loses energy as it travels further. What is point? Hoints are most often considered within the framework of 9uclidean geometry+ where they are one of the fundamental ob*ects. 9uclid originally defined the point vaguely+ as .that which has no part.. )n two dimensional 9uclidean space+ a point is represented by an ordered pair (x+y coordinates. What is 2ircle? A circle is a simple shape of 9uclidean geometry consisting of those points in a plane which are the same distance from a given point called the centre. The common distance of the points of a circle from its center is called its radius. What is Transformation? )n mathematics+ a transformation could be any function mapping a set \$ on to another set or on to itself. >owever+ often the set \$ has some additional algebraic or geometric structure and the term .transformation. refers to a function from \$ to itself which preserves this structure. 9xamples include linear transformations and affine transformations such as rotations+ reflections and translations. These can be carried out in 9uclidean space+ particularly in dimensions E and 4. They are also operations that can be performed using linear algebra+ and described explicitly using matrices. What is 40 2omputer Graphics? 40 computer graphics (in contrast to E0 computer graphics are graphics that use a three(dimensional representation of geometric data (often 2artesian that is stored in the computer for the purposes of performing calculations and rendering E0 images. -uch images may be for later display or for real(time viewing. What is curve? )n mathematics+ a curve consists of the points through which a continuously moving point passes. This notion captures the intuitive idea of a geometrical one(dimensional ob*ect+ which furthermore is connected in the sense of having no discontinuities or gaps. -imple examples include the sine wave as the basic

http://www.vustudents.net

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

http://www.vustudents.net

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

glut4E.lib in your compiler%s lib directory+ and glut4E.dll in your Windows system directory (c,RwindowsRsystem for Windows ?x+ or c,RwinntRsystem4E for Windows CTIEFFF . )n summary+ a fully installed Windows &penG# development environment will look like this, 1ile #ocation ScompilerTRincludeRgl gl.h glut.h glu.h ScompilerTRlib &pengl4E.lib glut4E.lib glu4E.lib SsystemT &pengl4E.dll glut4E.dll glu4E.dll where ScompilerT is your compiler directory (such as c,RHrogram 1ilesR5icrosoft :isual -tudioR:2?N and SsystemT is your Windows ?xICTIEFFF system directory (such as c,RwinntRsystem4E or c,RwindowsRsystem . Question: Answer: What is G#8T? >ow is it different from &penG#? 7ecause &penG# doesn%t provide routines for interfacing with a windowing system or input devices+ an application must use a variety of other platform( specific routines for this purpose. The result is nonportable code. 1urthermore+ these platform(specific routines tend to be full(featured+ which complicates construction of small programs and simple demos. G#8T is a library that addresses these issues by providing a platform(independent interface to window management+ menus+ and input devices in a simple and elegant manner. 8sing G#8T comes at the price of some flexibility. What is G#8? >ow is it different from &penG#? )f you think of &penG# as a low(level 40 graphics library+ think of G#8 as adding some higher(level functionality not provided by &penG#. -ome of G#8%s features include, o -caling of E0 images and creation of mipmap pyramids o Transformation of ob*ect coordinates into device coordinates and vice versa o -upport for C8/7- surfaces o -upport for tessellation of concave or bow tie polygonal primitives o -pecialty transformation matrices for creating perspective and orthographic pro*ections+ positioning a camera+ and selectionIpicking o /endering of disk+ cylinder+ and sphere primitives o )nterpreting &penG# error values as A-2)) text The best source of information on G#8 is the &penG# red and blue books and the G#8 specification+ which you can obtain from the &penG# org Web page. >ow does the camera work in &penG#? As far as &penG# is concerned+ there is no camera. 5ore specifically+ the camera is always located at the eye space coordinate (F.+ F.+ F. . To give the appearance of moving the camera+ your &penG# application must move the scene with the inverse of the camera transformation. >ow can ) move my eye+ or camera+ in my scene? &penG# doesn%t provide an interface to do this using a camera model. >owever+ the G#8 library provides the glu#ookAt( function+ which takes an eye position+ a position to look at+ and an up vector+ all in ob*ect space coordinates. This function computes the inverse camera transform according to its parameters and multiplies it onto the current matrix stack. Where should my camera go+ the 5odel:iew or Hro*ection matrix? The G#UH/&V92T)&C matrix should contain only the pro*ection transformation calls it needs to transform eye space coordinates into clip coordinates. The G#U5&09#:)9W matrix+ as its name implies+ should contain modeling and viewing transformations+ which transform ob*ect space coordinates into eye space coordinates. /emember to place the camera transformations on the G#U5&09#:)9W matrix and never on the G#UH/&V92T)&C matrix. Think of the pro*ection matrix as describing the attributes of your camera+ such as field of view+ focal length+ fish eye lens+ etc. Think of the 5odel:iew matrix as where you stand with the camera and the direction you point it. Given the current 5odel:iew matrix+ how can ) determine the ob*ect(space location of the camera? The .camera. or viewpoint is at (F.+ F.+ F. in eye space. When you turn this into a vector SF F F 6T and multiply it by the inverse of the 5odel:iew matrix+ the resulting vector is the ob*ect(space location of the camera. &penG# doesn%t let

http://www.vustudents.net

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

you in!uire (through a glGetM routine the inverse of the 5odel:iew matrix. 'ou%ll need to compute the inverse with your own code. Question: Answer: >ow do ) get a specified point (\$'W to appear at the center of the scene? glu#ookAt( is the easiest way to do this. -imply set the \$+ '+ and W values of your point as the fourth+ fifth+ and sixth parameters to glu#ookAt( . >ow do ) draw 40 ob*ects on a E0 screen? There are many ways to do this. -ome approaches map the viewing rectangle onto the scene+ by shooting rays through each pixel center and assigning color according to the ob*ect hit by the ray. &ther approaches map the scene onto the viewing rectangle+ by drawing each ob*ect into the region+ keeping track of which ob*ect is in front of which. The mapping mentioned above is also referred to as .pro*ection.+ and the two most popular pro*ections are perspective pro*ection and parallel pro*ection. 1or example+ to do a parallel pro*ection of a scene onto a viewing rectangle+ you can *ust discard the W coordinate (divide by depth + and .clip. the ob*ects to the viewing rectangle (discard portions that lie outside the region . >ow do ) draw a circle as a 7e=ier (or 7(-pline curve? The short answer is+ .'ou can%t.. 8nless you use a rational spline you can only approximate a circle. The approximation may look acceptable+ but it is sensitive to scale. 5agnify the scale and the error of approximation magnifies. 0eviations from circularity that were not visible in the small can become glaring in the large. What is color? 2olor is the perceptual result of light in the visible region of the spectrum+ having wavelengths in the region of JFF nm to @FF nm+ incident upon the retina. Hhysical power (or radiance is expressed in a spectral power distribution (-H0 + often in 46 components each representing a 6F nm band. What is )ntensity? )ntensity is a measure over some interval of the electromagnetic spectrum of the flow of power that is radiated from+ or incident on+ a surface. )ntensity is what ) call a linear(light measure+ expressed in units such as watts per s!uare meter. The voltages presented to a 2/T monitor control the intensities of the color components+ but in a nonlinear manner. 2/T voltages are not proportional to intensity. What is 2)9 color model? A color model based on human perception developed by the 2)9 (2ommission )nternationale de l%9clairage committee. While widely regarded as the most accurate color model+ 2)9 is unsuitable for many technologies+ including color printing and color monitors. 2onse!uently+ these systems need to use other color models+ such as 25'X and /G7. What is 25'X? -hort for 2yan(5agenta('ellow(7lack+ and pronounced as separate letters. 25'X is a color model in which all colors are described as a mixture of these four process colors. 25'X is the standard color model used in offset printing for full(color documents. 7ecause such printing uses inks of these four basic colors+ it is often called four(color printing. What is color monitor? A display monitor capable of displaying many colors. )n contrast+ a monochrome monitor can display only two colors (( one for the background and one for the foreground. 2olor monitors implement the /G7 color model by using three different phosphors that appear red+ green+ and blue when activated. 7y placing the phosphors directly next to each other+ and activating them with different intensities+ color monitors can create an unlimited number of colors. )n practice+

http://www.vustudents.net

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

http://www.vustudents.net

10

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

programs running in character mode are severely limited. Hrograms that run entirely in graphics mode are called graphics(based programs. )n character mode+ the display screen is treated as an array of blocks+ each of which can hold one A-2)) character. )n graphics mode+ the display screen is treated as an array of pixels. 2haracters and other shapes are formed by turning on combinations of pixels. Question: Answer: What is text mode? A video mode in which a display screen is divided into rows and columns of boxes. 9ach box can contain one character. Text mode is also called character mode. All video standards for the H2+ including :GA+ support a text mode that divides the screen into EA rows and NF columns. )n addition to text mode+ most video adapters support a graphics mode+ in which the display screen is divided into an array of pixels. Whereas character(based programs run in text mode+ all graphics(based programs run in graphics mode. What is animation? A simulation of movement created by displaying a series of pictures+ or frames. 2artoons on television is one example of animation. Animation on computers is one of the chief ingredients of multimedia presentations. There are many software applications that enable you to create animations that you can display on a computer monitor. Cote the difference between animation and video. Whereas video takes continuous motion and breaks it up into discrete frames+ animation starts with independent pictures and puts them together to form the illusion of continuous motion. What is 2A0? Acronym for computer(aided design. A 2A0 system is a combination of hardware and software that enables engineers and architects to design everything from furniture to airplanes. )n addition to the software+ 2A0 systems re!uire a high(!uality graphics monitorD a mouse+ light pen+ or digiti=ing tablet for drawingD and a special printer or plotter for printing design specifications. What is -:GA? -hort for -uper :GA+ a set of graphics standards designed to offer greater resolution than :GA. -:GA supports NFF x OFF resolution+ or JNF+FFF pixels. The -:GA standard supports a palette of 6O million colors+ but the number of colors that can be displayed simultaneously is limited by the amount of video memory installed in a system. &ne -:GA system might display only EAO simultaneous colors while another displays the entire palette of 6O million colors. The -:GA standards are developed by a consortium of monitor and graphics manufacturers called :9-A. W>AT )- #85)CAC29? 7rightness is defined by the 2)9 as the attribute of a visual sensation according to which an area appears to emit more or less light. 7ecause brightness perception is very complex+ the 2)9 defined a more tractable !uantity luminance which is radiant power weighted by a spectral sensitivity function that is characteristic of vision. What is #ightness? >uman vision has a nonlinear perceptual response to brightness, a source having a luminance only 6NG of a reference luminance appears about half as bright. The perceptual response to luminance is called #ightness. What is >ue? According to the 2)9+ hue is the attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors+ red+ yellow+ green and bue+ or a combination of two of them. /oughly speaking+ if the dominant wavelength of an -H0 shifts+ the hue of the associated color will shift. What is satuation?

http://www.vustudents.net

Question:

11

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

1rom the 2)9+ saturation is the colorfulness of an area *udged in proportion to its brightness. -aturation runs from neutral gray through pastel to saturated colors. /oughly speaking+ the more an -H0 is concentrated at one wavelength+ the more saturated will be the associated color. 'ou can desaturate a color by adding light that contains power at all wavelengths. 2an blue be assigned fewer bits than red or green? 7lue has a small contribution to the brightness sensation. >owever+ human vision has extraordinarily good color discrimination capability in blue colors. -o if you give blue fewer bits than red or green+ you will introduce noticeable contouring in blue areas of your pictures. What is True color? True color is the provision of three separate components for additive red+ green and blue reproduction. True color systems often provide eight bits for each of the three components+ so true color is sometimes referred to as EJ(bit color. What is gamma? The intensity of light generated by a physical device is not usually a linear function of the applied signal. A conventional 2/T has a power(law response to voltage, intensity produced at the face of the display is approximately the applied voltage+ raised to the E.A power. The numerical value of the exponent of this power function is collo!uially known as gamma. This nonlinearity must be compensated in order to achieve correct reproduction of intensity. What is contrast ratio? 2ontrast ratio is the ratio of intensity between the brightest white and the darkest black of a particular device or a particular environment. Hro*ected cinema film ( or a photographic reflection print ( has a contrast ratio of about NF,6. Television assumes a contrast ratio ( in your living room ( of about 4F,6. Typical office viewing conditions restrict contrast ratio of 2/T display to about A,6. What is motion capture? 5otion capture is a techni!ue by which a performer%s movements can be recorded digitally+ and reproduced by a 2G character either in real(time or after the data has been processed (depending on how the data is sampled . This allows for more realistic and natural motion in character animation. A variation of this techni!ue uses an armature instead of a performer+ and movements are made and keyframed the same way that stop(motion animators have been doing it for many years. >ow do ) do a hidden surface test (backface culling with E0 points? c Y (x6(xE M(y4(yE ((y6(yE M(x4(xE x6+y6+ xE+yE+ x4+y4 Y the first three points of the polygon. )f c is positive the polygon is visible. )f c is negative the polygon is invisible (or the other way . What are the Applications for 2omputer Graphics? 2omputer graphics applications are found in almost all areas. -ome of the important areas are, 8ser )nterfaces #ayout and 0esign -cientific :isuali=ation and Analysis Art 0esign 5edicine and :irtual -urgery #ayout 0esign Architectural -imulations >istory and cultural heritage 9ntertainment -imulations Games >ow do ) rotate a E0 point? )n E0+ you make (\$+' from (x+y with a rotation by angle t so, \$ Y x cos t ( y sin t ' Y x sin t Q y cos t As a ExE matrix this is very simple. )f you want to rotate a column vector v by t degrees using matrix 5+ use 5 Y Scos t (sin tT Ssin t cos tT in the product 5 v. )f you have a row vector+ use the transpose of 5 (turn rows into columns and vice versa . )f you want to combine rotations+ in E0 you can *ust

http://www.vustudents.net

12

## CS602 - Computer Graphics

http://www.vustudents.net

FAQ

add their angles+ but in higher dimensions you must multiply their matrices. What is meant by 2omputer Graphics? 2omputer Graphics involves technology to accept+ process+ transform and present information in a visual form that also concerns with producing images (or animations using a computer. what are 2omputer Graphics Applications? 2omputer graphics applications are found in almost all areas. -ome of the important areas are, 6. E. 4. J. A. O. @. N. ?. 6F. 8ser )nterfaces #ayout and 0esign -cientific :isuali=ation and Analysis Art and 0esign 5edicine and :irtual -urgery #ayout 0esign L Architectural -imulations >istory and cultural heritage 9ntertainment -imulations Games