I've been trying to wrap my head around the concept of drawing a line with thickness. Would you just draw a bunch of lines parallel to this line? Would you draw a bunch of lines perpendicular to this line? Would you use two triangles? (I heard everything uses triangles, but using triangles to draw a line seems like a gratuitous number of triangles.) Aren't all these methods prone to having "holes" in the thick line? What's the standard for this?

motoole2

Triangles are certainly very popular in the world of computer graphics. :-) But there are other primitives as well, including lines and points. For a line with some thickness, the common approach in 2D applications (e.g., powerpoint) is to model the line with a pair of triangles and rasterize the result. We will discuss rasterizing triangles a bit more in an upcoming lecture, and how we can do this without leaving any holes.

byungjul

I am curious about anti-aliasing.

motoole2

In the context of rasterizing lines, Xiaolin Wu's line algorithm is used for line antialiasing, where the line is effectively smoothed out. This reduces the jaggy effect associated with rasterizing lines using the Diamond rule.

I've been trying to wrap my head around the concept of drawing a line with thickness. Would you just draw a bunch of lines parallel to this line? Would you draw a bunch of lines perpendicular to this line? Would you use two triangles? (I heard everything uses triangles, but using triangles to draw a line seems like a gratuitous number of triangles.) Aren't all these methods prone to having "holes" in the thick line? What's the standard for this?

Triangles are certainly very popular in the world of computer graphics. :-) But there are other primitives as well, including lines and points. For a line with some thickness, the common approach in 2D applications (e.g., powerpoint) is to model the line with a pair of triangles and rasterize the result. We will discuss rasterizing triangles a bit more in an upcoming lecture, and how we can do this without leaving any holes.

I am curious about anti-aliasing.

In the context of rasterizing lines, Xiaolin Wu's line algorithm is used for line antialiasing, where the line is effectively smoothed out. This reduces the jaggy effect associated with rasterizing lines using the Diamond rule.