How to plot curve projection?

asked 2023-09-12 02:25:56 +0100

yklee gravatar image

updated 2023-09-12 05:56:32 +0100

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.<s> = manifolds.RealLine()
C = 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()

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))
edit retag flag offensive close merge delete