![]() ![]() So our cube would be represented like this: Vertices Since the most natural way to store this information is in two lists, we’ll use list indices to refer to the vertices in the vertex list. This suggests a generic structure we can use to represent any object made of triangles: a Vertices list, holding the coordinates of each vertex and a Triangles list, specifying which sets of three vertices describe triangles on the surface of the object.Įach entry in the Triangles list may include additional information besides the vertices that make it up for example, this would be the perfect place to specify the color of each triangle. Here’s a possible list of triangles for our cube: A, B, C This means that the vertex coordinates, by themselves, don’t fully describe the cube: we also need to know which sets of three vertices describe the triangles that make up its sides. ![]() However, we can’t take any three vertices of the cube and expect them to describe a triangle on its surface (for example, ADG is inside the cube). So we’ll represent each square side of the cube using two triangles. One of the reasons we chose triangles in the first place is that any other polygon, including squares, can be decomposed into triangles. The sides of the cube are square, but the algorithms we have developed work with triangles. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |