Преглед изворни кода

Added tutorial text and image

Former-commit-id: 6247fac557984b62a4eea6b79af287ca5641a74b
Oded Stein пре 7 година
родитељ
комит
415ccc23fb

+ 12 - 4
tutorial/712_DataSmoothing/main.cpp

@@ -41,7 +41,7 @@ int main(int argc, char * argv[])
         + V.block(0,2,V.rows(),1).array().pow(3);
 
     //Make the exact function noisy
-    srand(0);
+    srand(5);
     const double s = 0.2*(zexact.maxCoeff() - zexact.minCoeff());
     Eigen::VectorXd znoisy = zexact + s*Eigen::VectorXd::Random(zexact.size());
 
@@ -56,10 +56,10 @@ int main(int argc, char * argv[])
     igl::hessian_energy(V, F, QH);
 
     //Solve to find Laplacian-smoothed and Hessian-smoothed solutions
-    const double al = 5e-4;
+    const double al = 8e-4;
     Eigen::SimplicialLDLT<SparseMat> lapSolver(al*QL + (1.-al)*M);
     Eigen::VectorXd zl = lapSolver.solve(al*M*znoisy);
-    const double ah = 3e-6;
+    const double ah = 5e-6;
     Eigen::SimplicialLDLT<SparseMat> hessSolver(ah*QH + (1.-ah)*M);
     Eigen::VectorXd zh = hessSolver.solve(ah*M*znoisy);
 
@@ -89,12 +89,20 @@ int main(int argc, char * argv[])
         }
         Eigen::MatrixXd isoV;
         Eigen::MatrixXi isoE;
-        isolines(V, F, *z, 30, isoV, isoE);
+        if(key!='2')
+            isolines(V, F, *z, 30, isoV, isoE);
         viewer.data.set_edges(isoV,isoE,Eigen::RowVector3d(0,0,0));
         Eigen::MatrixXd colors;
         igl::jet(*z, true, colors);
         viewer.data.set_colors(colors);
     };
+    std::cout << R"(Usage:
+1  Show original function
+2  Show noisy function
+3  Biharmonic smoothing (zero Neumann boundary)
+4  Biharmonic smoothing (natural Hessian boundary)
+
+)";
     viewer.launch();
 
     return 0;

+ 1 - 0
tutorial/images/712_beetles.jpg.REMOVED.git-id

@@ -0,0 +1 @@
+5513240871aa3e7a212ac8c2ae8cb466ffac3793

+ 1 - 1
tutorial/tutorial.md.REMOVED.git-id

@@ -1 +1 @@
-4868a892c78947f78ff6985ff7ea6cc069dd1b4d
+931fb974d07d78f305e674a5abfe09803c817775