Esempio n. 1
0
        public Eigen ComputeEigen(TriMesh mesh, EnumLaplaceMatrix type, int count)
        {
            SparseMatrix matrix = LaplaceManager.Instance.GenerateLaplaceMatrix(type, mesh);
            Eigen        eigen  = ComputeEigen(matrix, mesh.FileName, count);

            return(eigen);
        }
Esempio n. 2
0
        public Eigen ComputeEigen(TriMesh mesh, EnumLaplaceMatrix type,int count)
        {
            SparseMatrix matrix = LaplaceManager.Instance.GenerateLaplaceMatrix(type, mesh);
            Eigen eigen=ComputeEigen(matrix,mesh.FileName,count);
            return eigen ;

        }
Esempio n. 3
0
        private void buttonMatrix_Click(object sender, EventArgs e)
        {
            EnumLaplaceMatrix type = (EnumLaplaceMatrix)this.comboBoxLaplaceType.SelectedItem;

            matrix = LaplaceManager.Instance.GenerateLaplaceMatrix(type, Mesh);

            InitMatrixInfo();
            InitMatrixDetail();
        }
Esempio n. 4
0
        private void dumpButton_Click(object sender, EventArgs e)
        {
            EnumLaplaceMatrix type = (EnumLaplaceMatrix)this.comboBoxLaplaceType.SelectedItem;

            int count = int.Parse(textBoxEigenNumber.Text);

            eigen = EigenManager.Instance.ComputeEigen(Mesh, type, count);

            InitEigenValue(eigen);
        }
Esempio n. 5
0
        private void InitMatrixInfo()
        {
            EnumLaplaceMatrix type = (EnumLaplaceMatrix)this.comboBoxLaplaceType.SelectedItem;

            this.dataGridViewMatrixInfo.Rows.Clear();
            this.dataGridViewMatrixInfo.Rows.Add("Type", type.ToString());
            this.dataGridViewMatrixInfo.Rows.Add("Column", matrix.ColumnSize);
            this.dataGridViewMatrixInfo.Rows.Add("Row", matrix.RowSize);
            this.dataGridViewMatrixInfo.Rows.Add("NoZero", matrix.NumOfElements());
            this.dataGridViewMatrixInfo.Rows.Add("Zero", matrix.ZeroSize);
            this.dataGridViewMatrixInfo.Rows.Add("Whole Size", (matrix.WholeSize));
            this.dataGridViewMatrixInfo.Rows.Add("Symmetric", (matrix.IsSymmetric()));
        }
Esempio n. 6
0
        public SparseMatrix GenerateLaplaceMatrix(EnumLaplaceMatrix targetType, TriMesh mesh)
        {
            SparseMatrix currentMatrix = null;

            switch (targetType)
            {
            case EnumLaplaceMatrix.LapalceGraph:
                currentMatrix = BuildLaplaceGraph(mesh);
                break;

            case EnumLaplaceMatrix.LaplaceTutte:
                currentMatrix = BuildLaplaceTutte(mesh);
                break;

            case EnumLaplaceMatrix.LaplaceTutteSys:
                currentMatrix = BuildLaplaceTutteSymmetrized(mesh);
                break;

            case EnumLaplaceMatrix.LaplaceGraphNomalized:
                currentMatrix = BuildLaplaceGraphNomalized(mesh);

                break;

            case EnumLaplaceMatrix.LapalceCot:
                currentMatrix = BuildLaplaceCot(mesh);
                break;

            case EnumLaplaceMatrix.LapalceCotArea:
                currentMatrix = BuildMatrixMeanCurvature(mesh);

                break;

            case EnumLaplaceMatrix.None:
                break;

            case EnumLaplaceMatrix.GraphTest:
                currentMatrix = BuildMatrixGraphTest(mesh);

                break;

            case EnumLaplaceMatrix.Cot:
                currentMatrix = BuildMatrixCot(mesh);

                break;

            case EnumLaplaceMatrix.CotNormalize:
                currentMatrix = BuildMatrixCotNormalize(mesh);

                break;

            case EnumLaplaceMatrix.MeanCurvature:
                currentMatrix = BuildMatrixMeanCurvature(mesh);

                break;

            case EnumLaplaceMatrix.MeanCurvatreNormalize:
                currentMatrix = BuildMatrixMeanCurvatureNormalize(mesh);

                break;

            case EnumLaplaceMatrix.CombinatorialGraphNormalized:
                currentMatrix = BuildMatrixCombinatorialGraphNormalized(mesh);

                break;

            case EnumLaplaceMatrix.Stffness:
                currentMatrix = BuildMatrixStiffness(mesh);
                break;

            case EnumLaplaceMatrix.Rigid:
                currentMatrix = BuildMatrixRigid(mesh);
                break;

            case EnumLaplaceMatrix.RigidPositive:
                currentMatrix = BuildMatrixRigidPositive(mesh);
                break;

            case EnumLaplaceMatrix.Mass:
                currentMatrix = BuildMatrixMass(mesh);
                break;

            case EnumLaplaceMatrix.CombinatorialGraph:
                currentMatrix = BuildMatrixCombinatorialGraph(mesh);
                break;

            case EnumLaplaceMatrix.MeanValue:
                currentMatrix = BuildMatrixMeanValue(mesh);
                break;

            case EnumLaplaceMatrix.Area:
                currentMatrix = BuildMatrixArea(mesh);
                break;

            case EnumLaplaceMatrix.TwoRingVV:
                currentMatrix = BuildTwoRingVV(mesh);
                break;

            case EnumLaplaceMatrix.AdjacentVV:
                currentMatrix = BuildAdjacentMatrixVV(mesh);
                break;

            case EnumLaplaceMatrix.AdjacentFV:
                currentMatrix = BuildAdjacentMatrixFV(mesh);
                break;

            case EnumLaplaceMatrix.AdjacentFF:
                currentMatrix = BuildAdjacentMatrixFF(mesh);
                break;


            default:
                break;
            }


            this.CurrentMatrixType = targetType;
            this.CurrentMatrix     = currentMatrix;
            return(currentMatrix);
        }
Esempio n. 7
0
        public SparseMatrix GenerateLaplaceMatrix(EnumLaplaceMatrix targetType, TriMesh mesh)
        {
           
            SparseMatrix currentMatrix = null;
            switch (targetType)
            {
                case EnumLaplaceMatrix.LapalceGraph:
                    currentMatrix = BuildLaplaceGraph(mesh); 
                    break;
                case EnumLaplaceMatrix.LaplaceTutte:
                    currentMatrix = BuildLaplaceTutte(mesh); 
                    break;
                case EnumLaplaceMatrix.LaplaceTutteSys:
                    currentMatrix = BuildLaplaceTutteSymmetrized(mesh); 
                    break;

                case EnumLaplaceMatrix.LaplaceGraphNomalized:
                    currentMatrix = BuildLaplaceGraphNomalized(mesh);

                    break;
                case EnumLaplaceMatrix.LapalceCot:
                    currentMatrix =BuildLaplaceCot(mesh); 
                    break;
                case EnumLaplaceMatrix.LapalceCotArea:
                    currentMatrix =BuildMatrixMeanCurvature(mesh);

                    break;

                case EnumLaplaceMatrix.None:
                    break;
                case EnumLaplaceMatrix.GraphTest:
                    currentMatrix = BuildMatrixGraphTest(mesh);
                   
                    break;
                case EnumLaplaceMatrix.Cot:
                    currentMatrix = BuildMatrixCot(mesh);
                    
                    break;
                case EnumLaplaceMatrix.CotNormalize:
                    currentMatrix = BuildMatrixCotNormalize(mesh);
                    
                    break;
                case EnumLaplaceMatrix.MeanCurvature:
                    currentMatrix = BuildMatrixMeanCurvature(mesh);
                    
                    break;
                case EnumLaplaceMatrix.MeanCurvatreNormalize:
                    currentMatrix = BuildMatrixMeanCurvatureNormalize(mesh);
                   
                    break;
                case EnumLaplaceMatrix.CombinatorialGraphNormalized:
                    currentMatrix = BuildMatrixCombinatorialGraphNormalized(mesh);
                   
                    break;

                case EnumLaplaceMatrix.Stffness:
                    currentMatrix = BuildMatrixStiffness(mesh);
                    break;

                case EnumLaplaceMatrix.Rigid:
                    currentMatrix = BuildMatrixRigid(mesh);
                    break;

                case EnumLaplaceMatrix.RigidPositive:
                    currentMatrix = BuildMatrixRigidPositive(mesh);
                    break;

                case EnumLaplaceMatrix.Mass:
                    currentMatrix =BuildMatrixMass(mesh);
                    break;

                case EnumLaplaceMatrix.CombinatorialGraph:
                    currentMatrix = BuildMatrixCombinatorialGraph(mesh);
                    break;
                case EnumLaplaceMatrix.MeanValue:
                    currentMatrix = BuildMatrixMeanValue(mesh);
                    break;

                case EnumLaplaceMatrix.Area :
                    currentMatrix = BuildMatrixArea(mesh);
                    break;

                case EnumLaplaceMatrix.TwoRingVV:
                    currentMatrix = BuildTwoRingVV(mesh);
                    break;

                case EnumLaplaceMatrix.AdjacentVV:
                    currentMatrix = BuildAdjacentMatrixVV(mesh);
                    break;

                case EnumLaplaceMatrix.AdjacentFV:
                    currentMatrix = BuildAdjacentMatrixFV(mesh);
                    break;

                case EnumLaplaceMatrix.AdjacentFF:
                    currentMatrix = BuildAdjacentMatrixFF(mesh);
                    break;

                
                default:
                    break;
            }


            this.CurrentMatrixType = targetType;
            this.CurrentMatrix = currentMatrix;
            return currentMatrix;
        }