Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168695
Image: ubuntu2004
# Exercise 1 (13.1 #33) # --------------------- # In addition to graphing the curve, I also # graphed the cone that it lies on. Note the # plot_points=300 option, which plots more # points for a better quality graph. var('x,y,t') curve = parametric_plot3d( ((1+cos(16*t))*cos(t),(1+cos(16*t))*sin(t),1+cos(16*t)),\ (-pi,pi),plot_points=300,color='black') cone = plot3d(sqrt(x^2+y^2),(x,-2,2),(y,-2,2),color='red',opacity=0.5) curve + cone
# Exercise 2 (13.2 #30) # --------------------- # Since I defined the variable t in the # first exercise, I don't have to do it # again. Also, because I'm lazy and don't # want to compute the tangent line by hand, # I have Sage do it for me. r = vector((sin(pi*t),2*sin(pi*t),cos(pi*t))) rgraph = parametric_plot3d(r,(-2,2),color='blue') tanline = parametric_plot3d(r(t=3)+t*diff(r,t)(t=3),(-0.5,0.5),color='orange') rgraph + tanline
# Exercise 3 (13.3 #26) # --------------------- # In addition to the graph of the curve, I # added text, an arrow, and a point in order # to completely answer the question. I've # been lazy again and made Sage calculate the # curvature at t = 1. r = vector((t,4*t^(3/2),-t^2)) kappa = (diff(r,t).cross_product(diff(r,t,2))).norm()/(diff(r,t).norm())^3 crv = parametric_plot3d(r,(0.001,2),color='black') point = point3d((1,4,-1),color='red') line = line3d([(1,2,-3),(1,4,-1)]) text = text3d('curvature = ' + repr(kappa(t=1).n(digits=3)),(1,2,-3.25)) crv + point + line + text