41 views

Uploaded by Surendra Singh Chauhan

Attribution Non-Commercial (BY-NC)

- Hidden Surface Removal Techniques
- Inkscape Tutorial
- Maya Wire Render
- Computer Graphics u and i Star
- The Video Game Explosion
- Photoshop Light Effect
- Particle Transport and Image Synthesis
- 2DArtist Issue 011 Nov06
- Create Custom Clothing for Your Fuse Character
- Icecubes in a Glass
- Graphics....
- CG Presentation
- canny filter
- CineFX_3
- Free PDF to Hpgl Converter
- Unit 1
- Log Filehtdf
- 4_lighting and Energy Standards and Codes
- p4 create original graphics images to meet a defined user need
- Intro to Animation

You are on page 1of 10

405

2010

Declaration:

I declare that this assignment is my individual work. I have not

copied from any other student’s work or from any other source

except where due acknowledgment is made explicitly in the

text, nor has any part been written for me by another person.

Student’s Signature:

NITI MALHOTRA

Evaluator’s comments:

________________________________________________________________

_____

Part A

Hodgeman is a better method than Weiler Atherton

polygon clipping algorithm. Perform clipping on a

Polygon and justify the above statement.

Answer:-

polygon. It works by extending each line of the convex clip

polygon in turn and selecting only vertices from the subject

polygon those are on the visible side.

The algorithm begins with an input list of all vertices in the

subject polygon. Next, one side of the clip polygon is extended

infinitely in both directions, and the path of the subject polygon

is traversed. Vertices from the input list are inserted into an

output list if they lie on the visible side of the extended clip

polygon line, and new vertices are added to the output list

where the subject polygon path crosses the extended clip

polygon line.

using the output list from one stage as the input list for the

next. Once all sides of the clip polygon have been processed,

the final generated list of vertices defines a new single polygon

that is entirely visible. Note that if the subject polygon was

concave at vertices outside the clipping polygon, the new

polygon may have coincident (i.e. overlapping) edges – this is

acceptable for rendering, but not for other applications such as

computing shadows.

polygon

a set of divided polygons, but is more complex and

computationally more expensive, and algorithm requires

polygons to be clockwise and not reentrant (self intersecting).

The algorithm can support holes (as counter-clockwise polygons

wholly inside their parent polygon), but requires additional

algorithms to decide which polygons are holes.

applications and is better than weiler Atherton algorithm

Sutherland–Hodgman can also be extended into 3D space by

clipping the polygon paths based on the boundaries of planes

defined by the viewing space.

for visible surface.

Answer:-

relations with the area:

the area.

and partly outside the area.

area.

the area.

bounding rectangles of surfaces for early confirmation or

rejection that the surfaces should be belong to that type.

2. Check the result from 1., that, if any of the following

condition is true, then, no subdivision of this area is needed.

b. Only one surface is inside, overlapping or surrounding surface

is in the area.

c. A surrounding surface obscures all other surfaces within the

area boundaries.

For cases b and c, the color of the area can be determined from

that single surface.

picture from a menu of basic shapes by dragging

each selected shape into position with a pick device.

Answer:-

#include <dos.h>

#include <graphics.h>

#include<stdio.h>

#include<conio.h>

#include<iostream.h>

union REGS in, out;

int cirrad1=0,cirrad2;

void detectmouse ()

{

in.x.ax = 0;

int86 (0X33,&in,&out);

if (out.x.ax == 0)

printf ("\nMouse Fail To Initialize");

else

printf ("\nMouse Succesfully Initialize");

}

void showmousetext ()

{

in.x.ax = 1;

int86 (0X33,&in,&out);

}

void showmousegraphics ()

{

in.x.ax = 1;

int86 (0X33,&in,&out);

getch ();

closegraph ();

}

void hidemouse ()

{

in.x.ax = 2;

int86 (0X33,&in,&out);

}

void draw ()

{ while(out.x.bx!=2)

{

int x,y,x1,y1;

in.x.ax = 3;

int86 (0X33,&in,&out);

cleardevice();

if (out.x.bx == 1)

{

x = out.x.cx;

y = out.x.dx;

setcolor(10);

circle(x,y,cirrad1);

}

if (out.x.bx == 1)

{

x = out.x.cx;

y = out.x.dx;

setcolor(10);

circle(x,y,cirrad2);

}

if (out.x.bx == 1)

{

x = out.x.cx;

y = out.x.dx;

//setcolor(10);

// circle(x,y,cirrad2);

}

if (out.x.bx == 1)

{

x1 = out.x.cx;

y1 = out.x.dx;

}

line(x,y,x+34,y+23);

line(x,y,x-90,y-0);

delay (10);

}

getch();

}

int main ()

{

cout<<"There will be 2 circle followes by a rectangle and

then a line";

cout<<"\nEnter the radius of the two circle ";

cin>>cirrad1;

cin>>cirrad2;

clrscr();

int gdriver = DETECT, gmode, errorcode;

initgraph(&gdriver, &gmode, "d:\\tc\\bgi");

detectmouse ();

showmousetext ();

draw ();

hidemouse ();

getch ();

return 0;

}

Part B

hidden lines from a scene.

Answer:-

1. Initialization:-

Repeat steps 2 and 3 until no further processing can be

performed.

2. Y-scan loop:-

increasing x.

3. X-scan loop:-

which contains the edge. Count the number of active

polygons whose IN/OUT flag is set to IN. if the number is 1,

only one polygon is visible. All pixel values from this edge

and up to next edge are set to the colour of the polygon. If

this number is greater than 1, determine the visible

polygon by the smallest z value of each polygon at the

pixel under consideration. These z values are found from

the equation of the plane containing the polygon. The pixel

from this edge and up to the next edge are set to the

colour of this polygon, unless the polygon becomes

obscured by another before the next edge is reached, in

which case we set the remaining pixel to the colour of the

obscuring polygon. If this number is 0, pixel from this edge

and up to the next one is left unchanged.

follows:-

equal the present scan line value y. if no edge

remain, the algorithm has finished.

x+1/m. this is the edge intersection with the next

scan line y+1.

step 2.

5) Suppose you are given an image. How will you

detect the presence of Hidden surfaces and remove

hindrance from the image?

Answer:-

The need of removing what is not visible has been and always

will be extremely high in the gaming industry, even though

graphic cards evolve at gigantic rates and things that were true

a couple years ago are not even remotely true these days.

When a game is created a goal frame rate[*] is set.

Object-space techniques

Applied before vertices are mapped to pixels

Image-space techniques

Applied after vertices have been rasterized

Z-buffering: -

dimensional (3-D) graphics, usually done in hardware,

sometimes in software. It is one solution to the visibility

problem, which is the problem of deciding which elements of a

rendered scene are visible, and which are hidden. The painter's

algorithm is another common solution which, though less

efficient, can also handle non-opaque scene elements. Z-

buffering is also known as depth buffering.

Ray tracing: -

the path of light through pixels in an image plane and

simulating the effects of its encounters with virtual objects. The

technique is capable of producing a very high degree of visual

realism, usually higher than that of typical scanline rendering

methods, but at a greater computational cost. This makes ray

tracing best suited for applications where the image can be

rendered slowly ahead of time, such as in still images and film

and television special effects, and more poorly suited for real-

time applications like computer games where speed is critical.

Ray tracing is capable of simulating a wide variety of optical

effects, such as reflection and refraction, scattering, and

chromatic aberration.

subdividing a space into convex sets by hyper planes. This

subdivision gives rise to a representation of the scene by means

of a tree data structure known as a BSP tree.

to increase the rendering efficiency. Some other applications

include performing geometrical operations with shapes in CAD,

collision detection in robotics and 3D computer games, and

other computer applications that involve handling of complex

spatial scenes.

Painter's algorithm: -

of the simplest solutions to the visibility problem in 3D

computer graphics. When projecting a 3D scene onto a 2D

plane, it is necessary at some point to decide which polygons

are visible, and which are hidden.

employed by many painters of painting distant parts of a scene

before parts which are nearer thereby covering some areas of

distant parts. The painter's algorithm sorts all the polygons in a

scene by their depth and then paints them in this order, farthest

to closest. It will paint over the parts that are normally not

visible — thus solving the visibility problem — at the cost of

having painted redundant areas of distant objects.

algorithm? Give reasons.

Answer:-

surface removal.

• It is also referred as Depth-Buffer method.

• Use the intensity color of the nearest 3D point for each

pixel.

• It contains 2 buffers:-

Frame buffer – stores image information.

Z-buffer – depth information with the same

resolution.

No, other algorithm provides such type of buffers. So it’s better

than other algorithms.

- Hidden Surface Removal TechniquesUploaded bySrivathsa Sharma
- Inkscape TutorialUploaded byMazry
- Maya Wire RenderUploaded byPrem Moraes
- Computer Graphics u and i StarUploaded bySrinivasan Alladi
- The Video Game ExplosionUploaded byEdgar Meritano
- Photoshop Light EffectUploaded byDuronto Khan
- Particle Transport and Image SynthesisUploaded byfermario
- 2DArtist Issue 011 Nov06Uploaded byPaula Nicodin
- Create Custom Clothing for Your Fuse CharacterUploaded byMayLiu
- Icecubes in a GlassUploaded byFirdaus Ds
- Graphics....Uploaded byRajat Sharma
- CG PresentationUploaded byAbdul samad
- canny filterUploaded byValentina Fernandez
- CineFX_3Uploaded bymandrake99
- Free PDF to Hpgl ConverterUploaded byEvan
- Unit 1Uploaded byimm
- Log FilehtdfUploaded byqwave
- 4_lighting and Energy Standards and CodesUploaded bySri Thirumala
- p4 create original graphics images to meet a defined user needUploaded byapi-300823967
- Intro to AnimationUploaded byayhel gerona
- PicturesUploaded byPaulo Correa
- 3735Uploaded byDavid Campoverde
- kelly-pride-final draftUploaded byapi-428041227
- CG MM Chapter01 Fall 2013Uploaded byMano Balan
- How to Create Metallic Files (1)Uploaded bymiamia005
- IJETR032766Uploaded byerpublication

- It 4Uploaded bySurendra Singh Chauhan
- Testing 4Uploaded bySurendra Singh Chauhan
- Testing 1Uploaded bySurendra Singh Chauhan
- Testing 2Uploaded bySurendra Singh Chauhan
- testing2 (1)Uploaded bySurendra Singh Chauhan
- system sw 4Uploaded bySurendra Singh Chauhan
- System Software 3Uploaded bySurendra Singh Chauhan
- System Programing Solve 1Uploaded bySurendra Singh Chauhan
- sp123Uploaded bySurendra Singh Chauhan
- s2Uploaded bySurendra Singh Chauhan
- rts 3Uploaded bySurendra Singh Chauhan
- rituUploaded bySurendra Singh Chauhan
- Real 4Uploaded bySurendra Singh Chauhan
- Real 1 SolutionUploaded bySurendra Singh Chauhan
- RD3804A15Uploaded bySurendra Singh Chauhan
- Kirti TestingUploaded bySurendra Singh Chauhan
- jiv testing2Uploaded bySurendra Singh Chauhan
- java HW 3Uploaded bySurendra Singh Chauhan
- Java 1Uploaded bySurendra Singh Chauhan
- Java 4Uploaded bySurendra Singh Chauhan
- java 2 (2)Uploaded bySurendra Singh Chauhan
- It 1Uploaded bySurendra Singh Chauhan
- It 3Uploaded bySurendra Singh Chauhan
- it 1 honrsUploaded bySurendra Singh Chauhan
- HW2_15Uploaded bySurendra Singh Chauhan
- Graphics 4Uploaded bySurendra Singh Chauhan
- Graphics 4 (1)Uploaded bySurendra Singh Chauhan
- Graphics 1Uploaded bySurendra Singh Chauhan
- D3804A15Uploaded bySurendra Singh Chauhan

- DEFO N American ImperialUploaded byFrancisco Hernandez Hernandez
- FHS Pipe and Fittings CatalogueUploaded byAHMEDMALAHY
- Chapter+06Uploaded byBùi Tuấn Anh
- Hidden LineUploaded bykannanviknesh
- Advanced Linux 3D Graphics ProgrammingUploaded byDevendra Mittal
- Computer Graphics - Visibility and Hidden SurfaceUploaded bySyedkareem_hkg
- 478a3solUploaded byVenkataMurali Krishna
- Jer LangUploaded byAkwasi Yeboah Nti-Addae
- CdaUploaded bykinny1974
- Pen & InkUploaded bynlalam
- Computer Graphics - Hidden Surface EliminationUploaded bySyedkareem_hkg
- 3D RenderingUploaded byMariusPirvu
- 10 - Qt Essentials - Graphics View ModuleUploaded byChristiane Meyer
- An Efficient Parametric Algorithm for Octree TraversalUploaded bytriton
- Computational Geometry_ Algorithms and Applications 2008.pdfUploaded byfrymaster2000
- Cg Solid ModelingUploaded byngovardhan
- Computer graphics methodsUploaded byrockafella91
- Ramblings in Realtime - Mike AbrashUploaded byEvil-Soft.com
- 3-2 sem question papers-2008Uploaded byapi-19718334
- 3D Modeling WikiBookUploaded byMikeVV
- bsppvsUploaded byKonanki Bhaskar
- BSP Trees PresentationUploaded byJürgen Holdschik
- Damien Rompapas - View Management for Virtual and Augmented RealityUploaded byRyu Uesugi
- Assignment 3 KdtreeUploaded bycartamenes
- 20040128bsp-octreeUploaded byysakhv
- Varios VrayUploaded bydarkyusuke
- ch13Uploaded bykannanviknesh
- Binary Space PartitionUploaded byManoj Kumar G
- Introduction to 3D Game Engine Design Using DirectX 9 and C#Uploaded byVera Tcaci
- visible surface detection.pptxUploaded bymanishbhavesh