Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- Circle & curve clipping algorithm by Mohamed El-Serngawy 11631 views
- Lecture 2d point,curve,text,line ... by avelraj 22713 views
- Clipping by Udayan Gupta 29354 views
- Polygon clipping by Mohd Arif 7909 views
- Clipping Algorithm In Computer Grap... by student(MCA) 30273 views
- Clipping in Computer Graphics by Laxman Puri 4033 views

12,072 views

Published on

Published in:
Education

No Downloads

Total views

12,072

On SlideShare

0

From Embeds

0

Number of Embeds

12

Shares

0

Downloads

233

Comments

0

Likes

3

No embeds

No notes for slide

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

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment