Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
| Download
Views: 1952

Render Yoda in interactive 3d using THREE.js

Warning: If your browser uses canvas instead of webgl, this will be painfully slow. With webgl, it is very fast after the model loads.

%auto # Yoda! -- over 53,756 triangles. from scipy import io x = io.loadmat('yodapose.mat') from sage.plot.plot3d.index_face_set import IndexFaceSet V = x['V']; F3=x['F3']-1; F4=x['F4']-1 Y = IndexFaceSet(F3,V,color='green') + IndexFaceSet(F4,V,color='green') Y = Y.rotateZ(-1); Y = Y.rotateX(-1) show(Y, frame=False)
unknown message type 'obj'
# 53756 vertices! len(x['V'])
53756