Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168722
Image: ubuntu2004
def tangentVec(r,t): return(diff(r,t)/norm(diff(r,t))) def Plottangent(r,t,x,**kwarg): var('U') r0=r(t=x) T=tangentVec(r,t)(t=x) return parametric_plot3d(list(r0+T*U),(U,0,1),**kwarg) def NormalVec(b,t): return(diff(b,t)/norm(diff(b,t))) def PlotUNormal(r,t,x,**kwarg): var('U') r0=r(t=x) T=NormalVec(tangentVec(r,t),t)(t=x) return parametric_plot3d(list(r0+T*U),(U,0,1),**kwarg) def binormalVector(r,t): return(tangentVec(r,t).cross_product(NormalVec(r,t))) def Plotbinormal(r,t,x,**kwarg): var('U') r0=r(t=x) T=binormalVector(r,t)(t=x) return parametric_plot3d(list(r0+T*U),(U,0,1),**kwarg) r(t)=[sin(t),cos(t),2*t] a=parametric_plot3d(r(t),(t,-10,10),thickness=5) b=Plottangent(r(t),t,-2,thickness=10,color='yellow') c=PlotUNormal(r(t),t,-2,thickness=10,color='red') d=Plotbinormal(r(t),t,-2,thickness=10,color='red') d