Files
igl/python/matlab/example1.m
T
Daniele Panozzo 4e4cadbbcf added conversion helpers for matlab
added examples for using the python wrappers in matlab
2015-10-07 01:49:58 +02:00

19 lines
376 B
Matlab

%% Launch the external viewer
launch_viewer;
%% Load a mesh in OFF format
V = py.igl.eigen.MatrixXd();
F = py.igl.eigen.MatrixXi();
py.igl.readOFF('../tutorial/shared/beetle.off', V, F);
%% Scale the x coordinate in matlab
V = p2m(V);
V(:,1) = V(:,1) * 2;
V = m2p(V);
%% Plot the mesh
viewer = py.tcpviewer_single.TCPViewer();
viewer.data.set_mesh(V, F);
viewer.launch();