#include #include #include #include // Input polygon Eigen::MatrixXd V; Eigen::MatrixXi F; Eigen::MatrixXd B; // Tetrahedralized interior Eigen::MatrixXd TV; Eigen::MatrixXi TT; Eigen::MatrixXi TF; // This function is called every time a keyboard button is pressed bool key_down(igl::opengl::glfw::Viewer& viewer, unsigned char key, int modifier) { using namespace std; using namespace Eigen; if (key >= '1' && key <= '9') { double t = double((key - '1')+1) / 9.0; VectorXd v = B.col(2).array() - B.col(2).minCoeff(); v /= v.col(0).maxCoeff(); vector s; for (unsigned i=0; i