Star Wars Sage: Yoda

1240 days ago by pub

See this thread on [sage-devel] for details.

import scipy from scipy import io 
       
x=io.loadmat('%s/yodapose.mat'%DATA)#you can change it to yodapose to use the high res version 
       
from sage.plot.plot3d.index_face_set import IndexFaceSet 
       
V=x['V'] F3=x['F3']-1 F4=x['F4']-1 
       
yoda=IndexFaceSet(F3,V,color='green')+IndexFaceSet(F4,V,color='green') 
       
yoda.show() 
       
theta = -7*pi/24 R_y = scipy.array([[cos(theta), 0, -sin(theta)],[0, 1, 0],[ sin(theta), 0, cos(theta)]],dtype=float) Vr = scipy.dot(V,R_y) 
       
yoda_r=IndexFaceSet(F3,Vr,color='green')+IndexFaceSet(F4,Vr,color='green') 
       
yoda_r.show()