Ask Your Question

Revision history [back]

How to plot curve projection?

I am newbie to sagemath tool and in the middle of leaning... I try to plot the projection curve on osculating plane with following code. But last two line doesn't work. How can it be done? Thank you in advance.

E.<x,y,z> = EuclideanSpace() R. = manifolds.RealLine() C = E.curve((1/2^0.5cos(t),1/2^0.5sin(t),1/2^0.5t), (s,-1.1pi,1.1*pi), name='C') T = C.tangent_vector_field() T.display() norm(T) norm(T).display() I = C.domain(); I Tp = I.vector_field([diff(T[i],s) for i in E.irange()], dest_map=C, name="T'") Tp.display() kappa = norm(Tp) kappa.expr() N = Tp/kappa N.display() B = T.cross_product(N); B FS = I.vector_frame(('T','N','B'), (T,N,B), symbol_dual=('t','n','b')) matrix([[u.dot(v).expr() for v in FS] for u in FS]) T.at(R(pi)).display() N.at(R(pi)).display() B.at(R(pi)).display()

Following does not work...: projectionToOsculating = [(C-C(0)).dot(T.at(R(0))), (C-C(0)).dot(N.at(R(0)))] show(projectionToOsculating.plot(thickness=2, aspect_ratio=1))

How to plot curve projection?

I am newbie to sagemath tool and in the middle of leaning... I try to plot the projection curve on osculating plane with following code. But last two line doesn't work. How can it be done? Thank you in advance.

E.<x,y,z> = EuclideanSpace()
R. R.<s> = manifolds.RealLine()
C = E.curve((1/2^0.5cos(t),1/2^0.5sin(t),1/2^0.5t), (s,-1.1pi,1.1*pi), E.curve((1/2^0.5*cos(t),1/2^0.5*sin(t),1/2^0.5*t), (s,-1.1*pi,1.1*pi), name='C')
T = C.tangent_vector_field()
T.display()
norm(T)
norm(T).display()
I = C.domain(); I
Tp = I.vector_field([diff(T[i],s) for i in E.irange()], dest_map=C, name="T'")
Tp.display()
kappa = norm(Tp)
kappa.expr()
N = Tp/kappa
N.display()
B = T.cross_product(N); B
FS = I.vector_frame(('T','N','B'), (T,N,B), symbol_dual=('t','n','b'))
matrix([[u.dot(v).expr() for v in FS] for u in FS])
T.at(R(pi)).display()
N.at(R(pi)).display()
B.at(R(pi)).display()

B.at(R(pi)).display()

Following does not work...: work...:

projectionToOsculating = [(C-C(0)).dot(T.at(R(0))), (C-C(0)).dot(N.at(R(0)))]
show(projectionToOsculating.plot(thickness=2, aspect_ratio=1))

aspect_ratio=1))