Exemplo n.º 1
0
        public static void VerifyIcosahedron()
        {
            // Get the points.
            Point3D A, B, C, D, E, F, G, H, I, J, K, L;

            G3.IcosahedronPoints(
                out A, out B, out C, out D, out E, out F,
                out G, out H, out I, out J, out K, out L);

            // Verify the points.
            G3.VerifyPoints(A, B, C, D, E, F, G, H, I, J, K, L);

            // Verify the faces.
            G3.VerifyPolygon(A, C, B);
            G3.VerifyPolygon(A, D, C);
            G3.VerifyPolygon(A, E, D);
            G3.VerifyPolygon(A, F, E);
            G3.VerifyPolygon(A, B, F);
            G3.VerifyPolygon(D, K, C);
            G3.VerifyPolygon(C, K, J);
            G3.VerifyPolygon(C, J, B);
            G3.VerifyPolygon(B, J, I);
            G3.VerifyPolygon(B, I, F);
            G3.VerifyPolygon(F, I, H);
            G3.VerifyPolygon(F, H, E);
            G3.VerifyPolygon(E, H, G);
            G3.VerifyPolygon(E, G, D);
            G3.VerifyPolygon(D, G, K);
            G3.VerifyPolygon(L, J, K);
            G3.VerifyPolygon(L, I, J);
            G3.VerifyPolygon(L, H, I);
            G3.VerifyPolygon(L, G, H);
            G3.VerifyPolygon(L, K, G);
        }
Exemplo n.º 2
0
        // Make an icosahedron without texture coordinates or smoothing.
        public static void AddIcosahedron(this MeshGeometry3D mesh)
        {
            // Get the points.
            Point3D A, B, C, D, E, F, G, H, I, J, K, L;

            G3.IcosahedronPoints(
                out A, out B, out C, out D, out E, out F,
                out G, out H, out I, out J, out K, out L);

            // Make the faces.
            mesh.AddPolygon(A, C, B);
            mesh.AddPolygon(A, D, C);
            mesh.AddPolygon(A, E, D);
            mesh.AddPolygon(A, F, E);
            mesh.AddPolygon(A, B, F);
            mesh.AddPolygon(D, K, C);
            mesh.AddPolygon(C, K, J);
            mesh.AddPolygon(C, J, B);
            mesh.AddPolygon(B, J, I);
            mesh.AddPolygon(B, I, F);
            mesh.AddPolygon(F, I, H);
            mesh.AddPolygon(F, H, E);
            mesh.AddPolygon(E, H, G);
            mesh.AddPolygon(E, G, D);
            mesh.AddPolygon(D, G, K);
            mesh.AddPolygon(L, J, K);
            mesh.AddPolygon(L, I, J);
            mesh.AddPolygon(L, H, I);
            mesh.AddPolygon(L, G, H);
            mesh.AddPolygon(L, K, G);
        }