Added multiple tutorials

Former-commit-id: 706aa31449
This commit is contained in:
Sebastian Koch
2016-06-03 16:53:22 +02:00
parent 0fabc50c00
commit c5e77fa5d7
33 changed files with 695 additions and 1390 deletions
+21
View File
@@ -0,0 +1,21 @@
# Add the igl library to the modules search path
import sys, os
sys.path.insert(0, os.getcwd() + "/../")
import pyigl as igl
# Input polygon
V = igl.eigen.MatrixXd([[-1, -1], [1, -1], [1, 1], [-1, 1], [-2, -2], [2, -2], [2, 2], [-2, 2]])
E = igl.eigen.MatrixXi([[0, 1], [1, 2], [2, 3], [3, 0], [4, 5], [5, 6], [6,7], [7,4]])
H = igl.eigen.MatrixXd([[0, 0]])
# Triangulated Interior
V2 = igl.eigen.MatrixXd()
F2 = igl.eigen.MatrixXi()
igl.triangle_triangulate(V, E, H, "a0.005q", V2, F2)
# Plot the mesh
viewer = igl.viewer.Viewer()
viewer.data.set_mesh(V2, F2)
viewer.launch()