Talk:Sutherland–Hodgman algorithm

This is an old revision of this page, as edited by Michael Hardy (talk | contribs) at 20:59, 30 March 2010 (moved Talk:Sutherland-Hodgman clipping algorithm to Talk:Sutherland–Hodgman algorithm). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Latest comment: 16 years ago by Cooperised in topic Inaccurate algorithm?
WikiProject iconComputing Stub‑class
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StubThis article has been rated as Stub-class on Wikipedia's content assessment scale.
???This article has not yet received a rating on the project's importance scale.
Note icon
This article has been automatically rated by a bot or other tool as Stub-class because it uses a stub template. Please ensure the assessment is correct before removing the |auto= parameter.

Images needed

This article would need images to make it easier to understand. Good examples for the images can be found here http://www.cs.drexel.edu/~david/Classes/CS430/Lectures/L-05_Polygons.6.pdf

There is a free image on commons commons:image:Sutherland-Hodgman clipping sample.svg 83.5.93.48 (talk) 12:07, 11 March 2008 (UTC)Reply

Inaccurate algorithm?

I'm certain the pseudocode presented here is inaccurate - by testing points for inclusion in the clip plane rather than testing them sequentially against the infinitely-extended clip plane edges (as in the diagrams above), the point of the algorithm is missed and bugs are introduced. For example, the leftmost line on the capital W in the graphical example would be clipped entirely because neither of its endpoints lie within the clip plane; the desired behaviour is, of course, to clip it to two edges of the clip plane as shown.

Unless anyone steps in here to point out an error in my thinking, I'll rewrite the algorithm within the next day or two. Comments? Cooperised (talk) 17:06, 23 June 2009 (UTC)Reply

Algorithm rewritten. I've adopted a loosely object-oriented style for the pseudocode, if anyone hates it they can change it.  :-) Cooperised (talk) 10:13, 24 June 2009 (UTC)Reply