/Icosahedron_OpenGL

Creating Icosahedron using OpenGL

Primary LanguageC++

Icosahedron

In this project we will use the OpenGL graphics API to create and display a three-dimensional image of a 20-sided Icosahedron. The Icosahedron is the largest possible Platonic Solid figure. All faces of the Icosahedron are equliateral triangles, with 5 triangles meeting at each vertex. The Icosahedron has a total of 12 vertices. We have the predefined three-dimensional vertex points, and a list of the vertices for each of the equlateral triangles. In this set of vertices, each vertex is exactly one unit from the 0,0,0 point, which is the center of the Icosahedron.

Experiments

  1. Here we simply draw the Icosahedron in 3–D space and display it from any viewing point of your choosing. We also make each face a different color. Additionally, we also add a 10 hertz (update every 100ms) and animation rotation about both the x and y axes. We rotate approximately 1 degree on each update.
  2. For the next experiemnt we start with the Icosahedron and find the center point of each edge of each of the 20 triangles. Next we create a vector from the 0,0,0 point to the midpoint of each edge. These midpoints will not be one unit from the enter. We extend these vectors to be exactly one unit from the origin, and then subdivide the original triangle into four smaller triangles, with the vertices all being one unit from the origin. We make each face a different color. Additionally, we also add a 10 hertz (update every 100ms) and animation rotation about both the x and y axes. We rotate approximately 1 degree on each update.
  3. In the next experiment, a command line argument will specify the depth of the subdividing the rectangles. The previous experiemnt is a depth of one (we subdivide the triangles just once). For a depth of two, we take each of the smaller triangles after the depth 1 subdivision and divide each of those into four smaller triangles. We continue the subdividing until the desired depth is reached.