3 views

Uploaded by Praveen Chintapalle

- latihan penjelmaan PMR
- Resume
- Graphics
- 2017-DB-Maths-12th-CBSE-PYP.pdf
- MaskComponents.pdf
- Geometry Home Practice Workbook
- Mathematical Terms
- Software Engineer, Architect, Developer, 3D Graphics Software En
- Creating Glass
- PCM_12_KNL_02-01-19 (Q. PAP..pdf
- ldwLog
- Cg[1] Material
- James Leighfield CV 2017
- Assignment
- Innovative Lesson Plan
- mawd syllabus 2018-2019 shah
- 4.1 Notes
- geometry prouject - real world examples
- Science Syllabus
- 9. Mathematics

You are on page 1of 13

c b

Simple Algorithms

We start from a triangle 1 1 2 2, and 3 3 Find all pixels inside Method 1 the worst algorithm For each pixel do If 2 then draw-pixel p end if End for Method 2 a slight improvement

T x ;y ; x ;y x ;y T p p T B

For each pixel 2 do If 2 then draw-pixel p end if End for The given previous algorithms suggest an important sub-problem: Given a triangle , and = How to determine: 2

p B p T T p px ; py p T

bounding

box T

Ray Firing

Here's a simple approach to test if 2 1 draw a ray from outward in any direction 2 count number of intersections of this ray with boundaries of 3 If odd, then 2 , otherwise, is not in Is this method correct? What happens if the ray crosses at a vertex?

p T p T p T p T

A slightly easier method Consider the edge 1 2 Write down the implicit function of this line

v v l ;

1 2

x; y

=

a ; x

12

+b

12

;

+c

12

;

l ; l ; x ;y h ; h ;

1 2 = f

x; y

:

l ;

1 2

x; y

=0

Apply the similar process shown above to 1 3 and 2 3 Construct half-planes 1 3 and 2 3 The important observation

l ; l ; h ; h ;

h ;

12

h ;

13

h ;

h ;

23

p T p h ; p h ; p l ; l ; l ;

1 2 1 3 2 3

px ; py

=0 =0 =0

px ; py

px ; py

Sweep-line Algorithm

p T

Observation If 2 , then neighboring pixels are probably in the triangle, too Coherence Idea 1 sweep from top to bottom 2 maintain intersections of and sweep-line span" 3 paint pixels in the span Algorithm Initialize and For each scan line covered by do Paint pixels on the current span Incrementally update and End for Question: how do we update and ? Answer: midpoint algorithm !

T xl xr T xl ; y ; : : : ; : : : ; xr ; y xl xr xl xr

Given a simple polygon with vertices 1 1 2 2 Find all pixels inside Polygon classi cation simple convex simple concave non-simple self-intersection Once again, we could compute a bounding box and use ray casting = , For each pixel 2 do If 2 then paint end if End for But this would NOT take advantage of coherence Coherence Adjacent pixels in image space are likely sharing the similar graphic properties such as color

P x ;y ; x ;y ;:::; xn ; yn P B bounding box P p B p P p

Scan Conversion

More e cient algorithm For each scanline Identify all intersections 0 1 ,1 Sort intersections from left to right Fill pixels between consecutive pairs of intersection

x ; x ; : : : ; xk

x

i; y

; x

2 +1

i

;y

We must deal with special cases" ! horizontal lines intersecting a vertex double intersection unwanted intersection We must speed up the edge intersection detection Data structure for e cient implementation A sorted edge table The active edge list From bottom to the top

Figure 3.39 Practical polygon scan conversion Many implementations just triangulate the polygon and then convert the triangles Extremely easy to do for convex polygons Triangles are often particularly nice to work with because they are always planar and simple

Special Cases

- latihan penjelmaan PMRUploaded byMamat Firdaus
- ResumeUploaded byKyle Peplow
- GraphicsUploaded byAlbert P Babu
- 2017-DB-Maths-12th-CBSE-PYP.pdfUploaded byanon_939676003
- MaskComponents.pdfUploaded byMageon7
- Geometry Home Practice WorkbookUploaded byBimalendu Das
- Mathematical TermsUploaded byMohan Lal
- Software Engineer, Architect, Developer, 3D Graphics Software EnUploaded byapi-76736041
- Creating GlassUploaded byjsyrris@hotmail.com
- PCM_12_KNL_02-01-19 (Q. PAP..pdfUploaded byDikshit Arora
- ldwLogUploaded bylance_villafuerte
- Cg[1] MaterialUploaded byLeela Pallava
- James Leighfield CV 2017Uploaded byAnonymous qI8sdc6kA
- AssignmentUploaded byMia Amira
- Innovative Lesson PlanUploaded byLekshmi Lachu
- mawd syllabus 2018-2019 shahUploaded byapi-423377664
- 4.1 NotesUploaded byMrs. Hedrick
- geometry prouject - real world examplesUploaded byapi-283655149
- Science SyllabusUploaded byPalak V. Godhwani
- 9. MathematicsUploaded byAditya Agarwal
- Sum of the Angles in a TriangleUploaded byStanciuPaul
- FW_1 - FINALUploaded bystefon kyle jores
- 2010 Prelim Revision - Vectors - Additional QuestionsUploaded byjoshua_98548
- Chapter Review 3Uploaded bylbeltranstfrancis
- Media File Extension Help SheetUploaded bymickellington
- Geometry 1W11Uploaded bytamilanba
- skpmg2Uploaded bymdmema
- 96482360-TCS-2012-1(2)Uploaded byArtika Shrivastava
- Answers for maths in focus 3uUploaded bydhiuehfiug
- Interior Angle2Uploaded byVioleta Vázquez

- Adobe Photoshop CS2 - Lesson 1Uploaded byS1536097F
- Perspective in 2D GamesUploaded bybobbob24
- Cartoonize TutorialUploaded byMadie Medul
- Effective Data Visualization the Right Chart for the Right DataUploaded byde7yT3iz
- Particle Analysis - ImageJ- Manual1Uploaded byNitishKumar
- Appropriating in PhotoshopUploaded byMin Kim Park
- Machine ToolUploaded bysifusz
- Citect-Quickstart Tutorial programmingUploaded byZamani Mahdi
- Report on MultimediaUploaded bySaurabh G
- Manual Sketchup VrayUploaded byCarlos Rodriguez Campos
- 232_Advanced 3d Photorealism Techniques - Chapter 0.pdfUploaded byseepage
- Erik HintonUploaded byhinton_erik
- Gimp TutorUploaded byaedinmanoj
- Seminar on Graphics Processing Unit ComputingUploaded byGanesh
- Add a Sparkle Trail to a Photo With PhotoshopUploaded bylilian
- COLOUR BASED IMAGE SEGMENTATION USING HYBRID KMEANS WITH WATERSHED SEGMENTATIONUploaded byIAEME Publication
- Justification PaperUploaded byAlex Villwock
- tgj2o u01 a01 careers assignment w rubric 2016Uploaded byapi-251973159
- Project computer graphicsUploaded byvaku
- Ieeephot HowtoUploaded byHailton Antunes
- A Practical Guide on Normal Mapping for GamesUploaded byatila1985
- Manual Deep Paint for 3dsMaxUploaded byInazio Elosegi
- Facture PDF OrangeUploaded byNicholas
- Video card Manual of ATI Rampage 700 GS 2GBUploaded byMed Amine Khaldi
- ACE Exam Guide IllustratorCS5Uploaded byfscardim
- AI DistortionUploaded bypinkwin
- Control MUploaded bySrinivasan Jeyakumar
- GflAx ReferenceUploaded byniente10
- Archmodels Vol 110 Desk Set OfficeUploaded bygombestralala
- natures fury rubricUploaded byapi-208074879