# The above stuff combined into an interactive cell
var('t,x,y')
@interact
def _(x0=(0),y0=(0),f = (x*y^2/(x^2+y^4)),in3d=checkbox(default=false)):
x1=x0+t
y1=y0
x2=x0
y2=y0+t
x3=x0+t*cos(10*t)
y3=y0+t*sin(10*t)
x4=x0+t^2
y4=y0-t^5
x5=x0-t
y5=y0-t/2
L = limit(f(x=x5,y=y5),t=0)
G = plot3d(f,(x,-1,1),(y,-1,1),color='lightblue')
G += parametric_plot3d([x1,y1,f(x=x1,y=y1)],(t,0.01,1),color='red',thickness=10)
G += parametric_plot3d([x2,y2,f(x=x2,y=y2)],(t,0.01,1),color='yellow',thickness=10)
G += parametric_plot3d([x3,y3,f(x=x3,y=y3)],(t,0.01,1),color='orange',thickness=10)
G += parametric_plot3d([x4,y4,f(x=x4,y=y4)],(t,0.01,1),color='green',thickness=10)
G += parametric_plot3d([x5,y5,f(x=x5,y=y5)],(t,0.01,1),color='purple',thickness=10)
G += point3d([x0,y0,L],color='white',size=25)
if in3d:
G.show(stereo="redcyan")
else:
G.show()
|
Click to the left again to hide and once more to show the dynamic interactive window
|