Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168731
Image: ubuntu2004
var('x,y,z,t')
(x, y, z, t)
def par(_x,_y,_z,r): return parametric_plot3d([_x,_y,_z],(t,0,r), thickness=20)
par(sin(t), cos(t),t,10)
par((4+sin(20*t))*cos(t), (4+sin(20*t))*sin(t), cos(20*t), 6*pi)
v = vector([e**(-3*t),t**2/sin(t)**2, cos(2*t)]) v
(e^(-3*t), t^2/sin(t)^2, cos(2*t))
[f.limit(t=0) for f in v]
[1, 1, 1]
par(t**2,t**4,t**6,10)
a,b = [0,0,0],[1,2,3] a,b = [vector(var) for var in a,b] f = (1-t)*a+t*(b-a) f
(t, 2*t, 3*t)
a,b = [1,-1,2],[4,1,7] a,b = [vector(var) for var in a,b] f = a+t*(b-a) f
(3*t + 1, 2*t - 1, 5*t + 2)
point([a,b],size=30)+parametric_plot3d(f,(t,0,1),thickness=4, color='red')
par(cos(t),sin(t),sin(6*t),2*pi)
var('x,y,z')
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_14.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("dmFyKCd4LHkseicp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmpLk3NVR/___code___.py", line 2, in <module> exec compile(u"var('x,y,z')" + '\n', '', 'single') File "", line 1, in <module> TypeError: 'list' object is not callable
par(t*cos(t),t*sin(t),t,20)+plot3d(sqrt(x**2+y**2), (x,-20,20),(y,-20,20),color='red')
par(t,0,2*t-t**2,2)+plot3d(x**2+y**2, (x,-3,3),(y,-2,2),color='red')+point([(0,0,0),(1,0,1)], size=30, color='green')
solve(2*t-t**2==t**2,t)
\newcommand{\Bold}[1]{\mathbf{#1}}\left[t = 0, t = 1\right]
par(cos(t)*sin(2*t),sin(t)*sin(2*t),cos(2*t),2*pi)
par(t,t*sin(t),t*cos(t),10*pi)
def xyz(r): return [(var,-r,r) for var in x,y,z]
plot3d(sqrt(x**2+y**2), *xyz(10))+plot3d(1+y,*xyz(10))+par(t,(t**2-1)/2,(t**2+1)/2,6)
solve(-t**2+4*t-3,t)
[t == 3, t == 1]
a = lambda q: [q**2,7*q-12,q**2] b = lambda q: [4*q-3,q**2,5*q-6] a(1), b(1),a(3), b(3)
([1, -5, 1], [1, 1, -1], [9, 9, 9], [9, 9, 9])
print 'collides at:', a(3), b(3)
collides at: [9, 9, 9] [9, 9, 9]