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!

- Curve clipping by Mohamed El-Serngawy 13138 views
- Lecture 2d point,curve,text,line ... by avelraj 23904 views
- Clipping by Udayan Gupta 32461 views
- Clipping Algorithm In Computer Grap... by student(MCA) 32987 views
- Clipping in Computer Graphics by Laxman Puri 4976 views
- Polygon clipping by Mohd Arif 10446 views

12,359 views

Published on

Explain Circle Clipping

Published in:
Education

No Downloads

Total views

12,359

On SlideShare

0

From Embeds

0

Number of Embeds

33

Shares

0

Downloads

189

Comments

0

Likes

3

No embeds

No notes for slide

- 1. Circle & Curve Clipping Algorithm<br />Presented By : <br /> Mohamed El-Serngawy<br />
- 2. Outline<br />Fast Circle Clipping Algorithm<br />Clipping Circle By Accept/Reject Test<br />
- 3. Fast Circle Clipping Algorithm<br />Introduction:<br />
- 4. Fast Circle Clipping Algorithm<br />Algorithm<br />
- 5. Fast Circle Clipping Algorithm<br />Algorithm<br />
- 6. Fast Circle Clipping Algorithm<br />Algorithm<br />
- 7. Fast Circle Clipping Algorithm<br />Algorithm<br />
- 8. Fast Circle Clipping Algorithm<br />Algorithm<br />
- 9. Clipping Circle By Accept/Reject Test<br />1-Scan Conversion of Circles <br />2-Write Points(x,y)<br />3-Clipping Circles<br />
- 10. Midpoint Circle Algorithm<br />Choose E as the next pixel if M lies inside the circle, and SE otherwise.<br />d =<br />d<0: Select E<br />dnew = d + (2xp+3)<br />d>0: Select SE<br />dnew = d + (2xp–2yp+5)<br />E<br />M<br />SE<br />xp<br />xp+1<br />
- 11. Midpoint Circle Algorithm<br />Start with P (x = 0, y = r). Compute d for the first midpoint at (1, r - ½): d = F(1, r - ½) = 5/4 - r<br />While (x < y) {<br /> If (d <= 0) // E is chosen<br />d = d + 2 * x + 3 <br /> Else // SE is chosen<br />y = y – 1<br />d = d + 2 * x – 2 * y + 5<br /> x = x+1; WritePixel (x, y)<br />}<br />
- 12. Write Points(x,y)<br />Writes pixels to the seven other octants<br />
- 13. Clipping Circles<br />Accept/Reject test<br /> – Does bounding box of<br /> the circle intersect with clipping box?<br />If yes, condition pixel<br /> write on clipping box inside/outside test<br />Also we can test Circle points by Point <br />Clipping .<br />-the point P=(x, y) is display in clipping <br />Boundry if <br />xmin< x <xmaxandymin<y<ymax<br />
- 14. Curve Clipping<br />Areas with curved boundaries can be clipped with methods similar to those discussed<br />in the previous .sections. Curve-clipping procedures will involve nonlinear<br />equations, however, and this requires more processing than for objects with<br />linear boundaries.<br />The bounding rectangle for a circle or other curved object can be used first<br />to test for overlap with a rectangular clip window. If the bounding rectangle for<br />the object is completely inside the window, we save the object. If the rectangle is<br />determined to be completely outside the window, we discard the object. In either<br />case, there is no further computation necessary. But if the bounding rectangle test<br />fails, we can look for other computation-saving approaches. For a circle, we can<br />use the coordinate extents of individual quadrants and then octants for preliminary<br />testing before calculating curve-window intersections. For an ellipse, we can<br />test the coordinate extents of individual quadrants. Figure blew illustrates circle<br />clipping against a rectangular window.<br />
- 15. Curve Clipping<br />Similar procedures can be applied when clipping <br />a curved object against a general polygon clip region. <br />On the first pass, we can clip the bounding rectangle<br />of the object against the bounding rectangle of the clip <br />region. <br />If the two regions overlap, we will need to solve the <br />simultaneous line-curve equations to obtain<br />the clipping intersection points.<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