Or maybe it’s really not that surprising: Because Direct2D is built on top of Direct3D, it seems reasonable for Direct2D to take advantage of the triangle support in Direct3D and the GPU. So it’s somewhat surprising to find triangles pop up in a rather obscure corner of Direct2D. In contrast, triangles aren’t found at all in most 2D graphics programming interfaces, where the most common two-dimensional primitives are lines, curves, rectangles and ellipses. Much of the work performed by a modern graphics processing unit (GPU) involves rendering triangles, so of course Direct3D programming involves working with triangles to define solid figures. Triangles are ubiquitous in 3D computer graphics. This is how triangles are shaded to mimic the reflection of light seen in real-world objects. The illusion of curvature is enhanced by exploiting another characteristic of triangles: If the three vertices of a triangle are associated with three different values-for example, three different colors or three different geometric vectors-these values can be interpolated over the surface of the triangle and used to color that surface. Of course, the surfaces of real-world objects are often curved, but if you make the triangles small enough, they can approximate curved surfaces to a degree sufficient to fool the human eye. Assembling a seemingly solid figure from triangle “building blocks” is the most fundamental process in 3D computer graphics. In 3D graphics programming, triangles form the surfaces of solid figures, starting with the simplest of all three-dimensional figures, the triangular pyramid, or tetrahedron. But that square can be divided into two triangles, each of which is flat, although not necessarily on the same plane. A square in 3D space isn’t guaranteed to be flat because the fourth point might not be in the same plane as the other three. Indeed, one way to define a plane in 3D space is with three non-collinear points, and that’s a triangle. On the other hand, any other type of polygon can be decomposed into a collection of triangles.Įven in three dimensions, a triangle is always flat. It’s nothing more than three points connected by three lines, and if you try to make it any simpler, it collapses into a single dimension. The triangle is the most basic two-dimensional figure. Volume 29 Number 3 DirectX Factor : Triangles and Tessellation
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |