from sage.misc.latex import JSMathExpr
print JSMathExpr("V(x,y,z)=W*r=W*[x,y,z]=W*(xi+yj+zk)"),'\n'
var('x,y,z,w,t')
r=vector([x,y,z])
print 'Radius vector is r = ',r,'\n'
print JSMathExpr("W=w*k"),'\n'
W=vector([0,0,w])
print 'Vector for Angular velocity is w = ',W,'\n'
V=W.cross_product(r)
print 'Cross product of w and r is w * r = ',V,'\n'
print JSMathExpr("Example for W=2*k and r is on the disc below:"),'\n'
w=2
disc = parametric_plot3d((2*sin(t),2*cos(t),0),(t,0,2*pi),aspect_ratio=1)
line = plot(vector([0,0,w]))
show(line+disc+plot(vector([0,10,0])),xmin=-2,xmax=2)

Kreyszig-8.4.2 Krieszig (Example) (last edited 2010-12-16 05:57:06 by 172)