Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
1999 views

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, figsize=4)
Error in lines 8-8 Traceback (most recent call last): File "/projects/aac665be-11aa-463c-8ac1-3c12092db79d/.sagemathcloud/sage_server.py", line 879, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/aac665be-11aa-463c-8ac1-3c12092db79d/.sagemathcloud/sage_salvus.py", line 2420, in show s = show0(objs, combine_all=True) File "/projects/aac665be-11aa-463c-8ac1-3c12092db79d/.sagemathcloud/sage_salvus.py", line 2405, in show0 b = show0(a) File "/projects/aac665be-11aa-463c-8ac1-3c12092db79d/.sagemathcloud/sage_salvus.py", line 2393, in show0 salvus.threed(obj, **kwds) TypeError: threed() got an unexpected keyword argument 'figsize'
# 53756 vertices! len(x['V'])
53756