You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 2: Digital Drawing (54)
CeHao1

According to the rule of top edge or left edge, some pixels might not be able to be chosen by any triangle even though it is an inner point of several triangles. So, the figure will have some "white" or "blanks" lines inside a closed shape.

wangjim19

^addressing the previous comment, I believe the purpose of this rule is to ensure that all pixels are chosen by some triangle if it is on an edge of multiple triangles. To see this, we can consider that if the point is on a horizontal edge and it is part of two triangles, then one of these triangles must be on the bottom, so that horizontal edge would be a top edge of the bottom triangle. Similarly, if it is on a non-horizontal edge, there must be a triangle on the right of the edge. It seems like there could be some edge cases where the point is exactly on a vertex though.

Staffrishiu

@CeHao1 That is a great point - not all pixels are covered even though they are exactly on the edges.

@wangjim19 That's a great idea and that is definitely a goal of the function but based on the image it looks like not every pixel is covered even if it is on the edge of two triangles (the two triangles in the top right share a pixel which isn't covered and same with the two in the bottom right).

Staffrishiu

Question to think about: what could be some other purposes to having rules like this considering the fact that these rules don't seem to gaurentee the max number of pixels possible are covered?

You must be enrolled in the course to comment