Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 102

Some interesting graphs

(I) Graph each of the following as instructed:


(1) x=1.5cos(t)cos(30t)x=1.5 \cos(t)-\cos(30t), y=1.5sin(t)sin(30t)y=1.5\sin(t)-\sin(30t),     for t(0,50)t\in(0,50)

(2) x=4sin(t+cos(100t))x = 4 \sin (t + \cos (100t)),   y=4cos(t+sin(100t))y = 4 \cos (t + \sin (100t)),     for t(0,10)t\in(0,10)

(3) (x2+y21)3=x2y3(x^2+y^2-1)^3 = x^2 y^3,     with x[1.5,1.5]x \in [-1.5,1.5], y[1.5,1.5]y\in[-1.5,1.5]

(II) Uncomment all lines in the following and see what you get:
# y = var('y') # mouth = implicit_plot( (-y+2.4)^2*(2.2-x^2)==(x^2+3*(-y+2.4)-2)^2, (x,-6,6), (y,-2,8), linewidth=3, color='red' ) # head = implicit_plot( 10*x^2==y^3*(6-y), (x,-6,6), (y,-2,8), linewidth=2 ) # rear = implicit_plot( ((x-3.6)^2 + (y-4)^2)^2==(x-3.6)^2 - (y-4)^2, (x,-6,6), (y,-2,8), linewidth=2, color='green' ) # lear = implicit_plot( ((x+3.6)^2 + (y-4)^2)^2==(x+3.6)^2 - (y-4)^2, (x,-6,6), (y,-2,8), linewidth=2, color='green' ) # t = var('t') # reye = parametric_plot( ( 0.02*t*cos(t)+1.5, 0.02*t*sin(t)+4 ), (t,0,20), color='black' ) # leye = parametric_plot( ( 0.02*t*cos(-t+pi)-1.5, 0.02*t*sin(-t+pi)+4 ), (t,0,20), color='black' ) # # show(mouth+head+lear+rear+reye+leye)
(III) Plot each of the following 3D graphs as intructed:


(1) x2+y2=z2x^2+y^2=z^2,     on x,y,z[3,3]x, y, z \in [-3,3]

(2) (x2+(9/4)y2+z21)3x2z3(9/80)y2z3=0(x^2+(9/4)y^2+z^2-1)^3 -x^2z^3 - (9/80)y^2 z^3 = 0,     on x,y,z[1.5,1.5]x, y, z \in [-1.5,1.5], with red color.

(IV) Uncomment all lines in the following and see what you get:
# def cf(u,ph): return 0.25*sin(u+ph)^2 # t = var('t') # curve = (t+sin(2*t), t+cos(t)) # revolution_plot3d(curve, (t,-pi,4*pi), parallel_axis='z', color=(cf, colormaps.PiYG), opacity=0.8)
# And here is a very interesting example I found from sagemath.sfasu.edu/home/pub/43/ # It defines a piecewise curve, rotates it about the x-axis, and then computes # the volume of the resulting shape by integration. x = var('x') f1 = -(1/pi*(x-pi))^2+3 f2 = 0.125*sin(x) + 2.875 f3 = 1.875/(6*pi-22)*(x-22) + 1 f4 = 1 f = piecewise( [ ((0,3*pi/2),f1), ((3*pi/2,6*pi),f2), ((6*pi,22),f3), ((22,23),f4) ] ) plot(f, (x,0,23), aspect_ratio=1) a = revolution_plot3d(f1, (x,0,3*pi/2), parallel_axis='x', aspect_ratio=1, color='chartreuse') b = revolution_plot3d(f2, (x,3*pi/2,6*pi), parallel_axis='x', color='violet') c = revolution_plot3d(f3, (x,6*pi,22), parallel_axis='x', color='aqua') d = revolution_plot3d(f4, (x,22,23), parallel_axis='x', color='brown') show(a+b+c+d, frame=False) # Compute the volume (exclude cap): vol = integral(pi*(f1)^2, x,0,3*pi/2) + integral(pi*(f2)^2, x,3*pi/2,6*pi) + integral(pi*(f3)^2, x, 6*pi, 22) print "\n Volume = %f" % vol
3D rendering not yet implemented
Volume = 518.314223