diff --git a/tutorial/tutorial.html b/tutorial/tutorial.html index f76a0af84..c858c1ee5 100644 --- a/tutorial/tutorial.html +++ b/tutorial/tutorial.html @@ -273,7 +273,7 @@ By default, the .h files include the corresponding cpp files, making the library

Reading a mesh from a file requires a single libigl function call:

-
igl::readOFF("../shared/cube.off", V, F);
+
igl::readOFF(tutorial_shared_path + "/cube.off", V, F);
 

The function reads the mesh cube.off and it fills the provided V and F matrices. @@ -298,13 +298,15 @@ render it.

#include <igl/readOFF.h>
 #include <igl/viewer/Viewer.h>
 
+#include "tutorial_shared_path.h"
+
 Eigen::MatrixXd V;
 Eigen::MatrixXi F;
 
 int main(int argc, char *argv[])
 {
   // Load a mesh in OFF format
-  igl::readOFF("../shared/bunny.off", V, F);
+  igl::readOFF(tutorial_shared_path + "/bunny.off", V, F);
 
   // Plot the mesh
   igl::Viewer viewer;
@@ -2593,7 +2595,7 @@ viewer.
 “Workspaces”. This C++ snippet saves a mesh and it’s sparse Laplacian matrix to
 a file:

-
igl::readOFF("../shared/fertility.off", V, F);
+
igl::readOFF(tutorial_shared_path + "/fertility.off", V, F);
 igl::cotmatrix(V,F,L);
 igl::MatlabWorkspace mw;
 mw.save(V,"V");
@@ -2617,7 +2619,7 @@ instance upon execution.

Libigl has wrapped up a particularly useful formatting which makes it simple to copy standard output from a C++ program into a Matlab IDE. The code:

-
igl::readOFF("../shared/2triangles.off", V, F);
+
igl::readOFF(tutorial_shared_path + "/2triangles.off", V, F);
 igl::cotmatrix(V,F,L);
 std::cout<<igl::matlab_format(V,"V")<<std::endl;
 std::cout<<igl::matlab_format((F.array()+1).eval(),"F")<<std::endl;
diff --git a/tutorial/tutorial.md b/tutorial/tutorial.md
index 2db6de1ee..eca42bfd1 100644
--- a/tutorial/tutorial.md
+++ b/tutorial/tutorial.md
@@ -226,7 +226,7 @@ By default, the .h files include the corresponding cpp files, making the library
 Reading a mesh from a file requires a single libigl function call:
 
 ```cpp
-igl::readOFF("../shared/cube.off", V, F);
+igl::readOFF(tutorial_shared_path + "/cube.off", V, F);
 ```
 
 The function reads the mesh cube.off and it fills the provided `V` and `F` matrices.
@@ -259,7 +259,7 @@ Eigen::MatrixXi F;
 int main(int argc, char *argv[])
 {
   // Load a mesh in OFF format
-  igl::readOFF("../shared/bunny.off", V, F);
+  igl::readOFF(tutorial_shared_path + "/bunny.off", V, F);
 
   // Plot the mesh
   igl::Viewer viewer;
@@ -2300,7 +2300,7 @@ To aid debugging, libigl also supplies functions to write Matlab `.mat`
 a file:
 
 ```cpp
-igl::readOFF("../shared/fertility.off", V, F);
+igl::readOFF(tutorial_shared_path + "/fertility.off", V, F);
 igl::cotmatrix(V,F,L);
 igl::MatlabWorkspace mw;
 mw.save(V,"V");
@@ -2325,7 +2325,7 @@ Libigl has wrapped up a particularly useful formatting which makes it simple to
 copy standard output from a C++ program into a Matlab IDE. The code:
 
 ```cpp
-igl::readOFF("../shared/2triangles.off", V, F);
+igl::readOFF(tutorial_shared_path + "/2triangles.off", V, F);
 igl::cotmatrix(V,F,L);
 std::cout<