SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Curve clipping
The bounding rectangle for a curved object can be used first to test for overlap with a rectangular clip window (we can use polygon clipping) XMAX , Y MAX XMIN , Y MAX XMIN , Y MIN XMAX , Y MIN Object
Case 1 If the bounding rectangle for the object is completely inside the window, we save the object. Clipping window Bounding rectangle
Case 2 If the rectangle is determined to be completely outside the window, we discard the object Object
Case 3 If the two regions overlap, we will need to solve the simultaneous line-curve equations to obtain the clipping intersection points.
[object Object]
We have to consider special curves as circles and ellipses before solving the equations simultaneously.,[object Object]
Circle clipping cont.. If XC - R > Xright Then the circle is discarded R  X right Xc -R XC
Circle clipping cont.. If YC - R >Ytop Then the circle is discarded Yc -R Y top Clipping window
Circle clipping cont.. If YC +R <Ybottom Then the circle is discarded Y bottom Yc + R
Circle clippingcont.. If all the four previous conditions are false then the circle is saved
Circle clipping cont.. Intersection conditions:  With right edge: Xc+R>Xright With left edge: Xc-R<Xleft With top edge : Yc+R>Ytop With bottom edge: Yc-R<Ybottom
Circle clipping cont.. Getting intersection points : Example : The intersection with the right edge   1- Simply    Cos α = Xright-Xc /R 2- Get  α 3- y=R  sin α 4- the segment from angle 0   to angle α is discarded  5- the segment from angle α to angle 360-α is considered 6- the segment from angle 360-α to angle 360 is considered First intersection angle=α α Start (angle=0) α Second intersection X right Xc
Other techniques  Clip individual point : for point plotted curves , may consume time if number of points is great. Curves approximated to poly lines: clip individual line segments , if segment is not small enough no accurate result , if it is small more than enough , it will be time consuming for linear segments
Spline curve : definition A Spline Curve : Any Composite curve formed with polynomial sections satisfying specified continuity conditions at the boundary of the pieces.
Specifying Splines
Example : Third order spline In order to assure C1 continuity  at two extremities, our functions must be of at least degree 3
18 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Convex Hull Property Bezier curves lie in the convex hull of their control points Hence, even though we do not interpolate all the data, we cannot be too far away p1 p2 convex hull Bezier curve p3 p0
Bézier Clipping Problem Given polynomial p withdegree n Find all roots within an interval Algorithm Bézier representation Intersect the convex hull with t-axis Obtain a new interval
Bézier Clipping
Bézier Clipping
Bézier Clipping
Bézier Clipping
Bézier Clipping
The Approximated Roots A sequence of intervals that bound the root of p If the width of interval is smaller than the given tolerance, return the root (interval).
Convergence Rates A sequence of intervals that converge to the root: How fast does the sequence converge?
2. Quadratic Clipping
Quadratic Clipping Idea Use quadratic bounds Motivation To improve the convergence rate
Quadratic Bounds Upper bound Lower bound
Quadratic Bounds But, how to compute the quadratic bounds efficiently?
Quadratic Bounds Approximated quadratic bounds Upper bound Best quadratic approximant Lower bound
Quadratic Clipping The same type of algorithm as Bézier clipping Convex hull  Quadratic bounds Find the best quadratic approximant q of p in L2 norm Compute error bound of p and q Construct quadratic functions: upper bound M, lower bound m Compute roots of M and m
Quadratic Clipping
Quadratic Clipping
Quadratic Clipping
Quadratic Clipping
Quadratic Clipping
Quadratic Clipping
Quadratic Clipping

Weitere ähnliche Inhalte

Was ist angesagt?

Polygon clipping
Polygon clippingPolygon clipping
Polygon clippingMohd Arif
 
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmMaruf Abdullah (Rion)
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphicanku2266
 
The sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmThe sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmMani Kanth
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesOmprakash Chauhan
 
Clipping in Computer Graphics
Clipping in Computer Graphics Clipping in Computer Graphics
Clipping in Computer Graphics Barani Tharan
 
Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformationAnkit Garg
 
Liang barsky Line Clipping Algorithm
Liang barsky Line Clipping AlgorithmLiang barsky Line Clipping Algorithm
Liang barsky Line Clipping AlgorithmArvind Kumar
 
Back face detection
Back face detectionBack face detection
Back face detectionPooja Dixit
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clippingAnkit Garg
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfAmol Gaikwad
 
2D viewing & clipping
2D viewing & clipping2D viewing & clipping
2D viewing & clippingMdAlAmin187
 

Was ist angesagt? (20)

Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping Algorithm
 
Three dimensional concepts - Computer Graphics
Three dimensional concepts - Computer GraphicsThree dimensional concepts - Computer Graphics
Three dimensional concepts - Computer Graphics
 
Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
 
The sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmThe sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithm
 
Bezier curve computer graphics
Bezier curve computer graphics Bezier curve computer graphics
Bezier curve computer graphics
 
Depth Buffer Method
Depth Buffer MethodDepth Buffer Method
Depth Buffer Method
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - Notes
 
Clipping in Computer Graphics
Clipping in Computer Graphics Clipping in Computer Graphics
Clipping in Computer Graphics
 
Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformation
 
Clipping
ClippingClipping
Clipping
 
Liang barsky Line Clipping Algorithm
Liang barsky Line Clipping AlgorithmLiang barsky Line Clipping Algorithm
Liang barsky Line Clipping Algorithm
 
Back face detection
Back face detectionBack face detection
Back face detection
 
Spline representations
Spline representationsSpline representations
Spline representations
 
Computer Graphics - clipping
Computer Graphics - clippingComputer Graphics - clipping
Computer Graphics - clipping
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdf
 
2D viewing & clipping
2D viewing & clipping2D viewing & clipping
2D viewing & clipping
 
Halftoning in Computer Graphics
Halftoning  in Computer GraphicsHalftoning  in Computer Graphics
Halftoning in Computer Graphics
 

Ähnlich wie Curve and circle clipping techniques

Ähnlich wie Curve and circle clipping techniques (20)

Week6.ppt
Week6.pptWeek6.ppt
Week6.ppt
 
Clipping computer graphics
Clipping  computer graphicsClipping  computer graphics
Clipping computer graphics
 
Hprec6 4
Hprec6 4Hprec6 4
Hprec6 4
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
 
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLiang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
 
D4 trigonometrypdf
D4 trigonometrypdfD4 trigonometrypdf
D4 trigonometrypdf
 
Trigonometric Function of General Angles Lecture
Trigonometric Function of General Angles LectureTrigonometric Function of General Angles Lecture
Trigonometric Function of General Angles Lecture
 
Lect 5 2d clipping
Lect 5 2d clippingLect 5 2d clipping
Lect 5 2d clipping
 
A Tutorial on Computational Geometry
A Tutorial on Computational GeometryA Tutorial on Computational Geometry
A Tutorial on Computational Geometry
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
 
Trigonometry Functions
Trigonometry FunctionsTrigonometry Functions
Trigonometry Functions
 
Lecture24
Lecture24Lecture24
Lecture24
 
99995327.ppt
99995327.ppt99995327.ppt
99995327.ppt
 
Trigonometry and trigonometric ratios angles
Trigonometry and trigonometric  ratios anglesTrigonometry and trigonometric  ratios angles
Trigonometry and trigonometric ratios angles
 
UNIT2.pptx
UNIT2.pptxUNIT2.pptx
UNIT2.pptx
 
Unit ii divide and conquer -4
Unit ii divide and conquer -4Unit ii divide and conquer -4
Unit ii divide and conquer -4
 
Wynberg girls high-louise keegan-maths-grade11-trigonometry revision
Wynberg girls high-louise keegan-maths-grade11-trigonometry revisionWynberg girls high-louise keegan-maths-grade11-trigonometry revision
Wynberg girls high-louise keegan-maths-grade11-trigonometry revision
 
lecture8 clipping
lecture8 clippinglecture8 clipping
lecture8 clipping
 
Areas and Definite Integrals.ppt
Areas and Definite Integrals.pptAreas and Definite Integrals.ppt
Areas and Definite Integrals.ppt
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 

Kürzlich hochgeladen

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Kürzlich hochgeladen (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

Curve and circle clipping techniques

  • 2. The bounding rectangle for a curved object can be used first to test for overlap with a rectangular clip window (we can use polygon clipping) XMAX , Y MAX XMIN , Y MAX XMIN , Y MIN XMAX , Y MIN Object
  • 3. Case 1 If the bounding rectangle for the object is completely inside the window, we save the object. Clipping window Bounding rectangle
  • 4. Case 2 If the rectangle is determined to be completely outside the window, we discard the object Object
  • 5. Case 3 If the two regions overlap, we will need to solve the simultaneous line-curve equations to obtain the clipping intersection points.
  • 6.
  • 7.
  • 8. Circle clipping cont.. If XC - R > Xright Then the circle is discarded R X right Xc -R XC
  • 9. Circle clipping cont.. If YC - R >Ytop Then the circle is discarded Yc -R Y top Clipping window
  • 10. Circle clipping cont.. If YC +R <Ybottom Then the circle is discarded Y bottom Yc + R
  • 11. Circle clippingcont.. If all the four previous conditions are false then the circle is saved
  • 12. Circle clipping cont.. Intersection conditions: With right edge: Xc+R>Xright With left edge: Xc-R<Xleft With top edge : Yc+R>Ytop With bottom edge: Yc-R<Ybottom
  • 13. Circle clipping cont.. Getting intersection points : Example : The intersection with the right edge 1- Simply Cos α = Xright-Xc /R 2- Get α 3- y=R sin α 4- the segment from angle 0 to angle α is discarded 5- the segment from angle α to angle 360-α is considered 6- the segment from angle 360-α to angle 360 is considered First intersection angle=α α Start (angle=0) α Second intersection X right Xc
  • 14. Other techniques Clip individual point : for point plotted curves , may consume time if number of points is great. Curves approximated to poly lines: clip individual line segments , if segment is not small enough no accurate result , if it is small more than enough , it will be time consuming for linear segments
  • 15. Spline curve : definition A Spline Curve : Any Composite curve formed with polynomial sections satisfying specified continuity conditions at the boundary of the pieces.
  • 17. Example : Third order spline In order to assure C1 continuity  at two extremities, our functions must be of at least degree 3
  • 18. 18 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Convex Hull Property Bezier curves lie in the convex hull of their control points Hence, even though we do not interpolate all the data, we cannot be too far away p1 p2 convex hull Bezier curve p3 p0
  • 19. Bézier Clipping Problem Given polynomial p withdegree n Find all roots within an interval Algorithm Bézier representation Intersect the convex hull with t-axis Obtain a new interval
  • 25. The Approximated Roots A sequence of intervals that bound the root of p If the width of interval is smaller than the given tolerance, return the root (interval).
  • 26. Convergence Rates A sequence of intervals that converge to the root: How fast does the sequence converge?
  • 28. Quadratic Clipping Idea Use quadratic bounds Motivation To improve the convergence rate
  • 29. Quadratic Bounds Upper bound Lower bound
  • 30. Quadratic Bounds But, how to compute the quadratic bounds efficiently?
  • 31. Quadratic Bounds Approximated quadratic bounds Upper bound Best quadratic approximant Lower bound
  • 32. Quadratic Clipping The same type of algorithm as Bézier clipping Convex hull  Quadratic bounds Find the best quadratic approximant q of p in L2 norm Compute error bound of p and q Construct quadratic functions: upper bound M, lower bound m Compute roots of M and m
  • 41. The Approximated Root A sequence of intervals that bound the root of p If the width of interval is smaller than the given tolerance, return the root (interval).