example1.m 376 B

123456789101112131415161718
  1. %% Launch the external viewer
  2. launch_viewer;
  3. %% Load a mesh in OFF format
  4. V = py.igl.eigen.MatrixXd();
  5. F = py.igl.eigen.MatrixXi();
  6. py.igl.readOFF('../tutorial/shared/beetle.off', V, F);
  7. %% Scale the x coordinate in matlab
  8. V = p2m(V);
  9. V(:,1) = V(:,1) * 2;
  10. V = m2p(V);
  11. %% Plot the mesh
  12. viewer = py.tcpviewer_single.TCPViewer();
  13. viewer.data.set_mesh(V, F);
  14. viewer.launch();