with(LinearAlgebra):with(plots): Ennep:=; plot3d(Ennep,u=-2..2,v=-2..2,scaling= constrained,shading=zhue,lightmodel=light1,orientation=[89,54]); EFG:=proc(X) > local Xu,Xv,E,F,G; > Xu:=; > Xv:=; > E:=DotProduct(Xu,Xu,conjugate=false); > F:=DotProduct(Xu,Xv,conjugate=false); > G:=DotProduct(Xv,Xv,conjugate=false); > simplify([E,F,G]); > end: UN:=proc(X) > local Xu,Xv,Z,s; > Xu:=; > Xv:=; > Z:=CrossProduct(Xu,Xv); > s:=VectorNorm(Z,Euclidean,conjugate=false); > simplify(,sqrt,trig,symbolic); > end: lmn:=proc(X) > local Xu,Xv,Xuu,Xuv,Xvv,U,l,m,n; > Xu:=; > Xv:=; > Xuu:=; > Xuv:=; > Xvv:=; > U:=UN(X); > l:=DotProduct(U,Xuu,conjugate=false); > m:=DotProduct(U,Xuv,conjugate=false); > n:=DotProduct(U,Xvv,conjugate=false); > simplify([l,m,n],sqrt,trig,symbolic); > end: shape:=proc(X) > local Y,Z,a,b,c,d; > Y:=EFG(X); > Z:=lmn(X); > a:=simplify((Z[1]*Y[3]-Z[2]*Y[2])/(Y[1]*Y[3]-Y[2]^2)); > b:=simplify((Z[2]*Y[1]-Z[1]*Y[2])/(Y[1]*Y[3]-Y[2]^2)); > c:=simplify((Z[2]*Y[3]-Z[3]*Y[2])/(Y[1]*Y[3]-Y[2]^2)); > d:=simplify((Z[3]*Y[1]-Z[2]*Y[2])/(Y[1]*Y[3]-Y[2]^2)); > [S(x_u)=a*x_u+b*x_v,S(x_v)=c*x_u+d*x_v]; > end: shape_matrix:=proc(X) > local Y,Z,a,b,c,d; > Y:=EFG(X); > Z:=lmn(X); > a:=simplify((Z[1]*Y[3]-Z[2]*Y[2])/(Y[1]*Y[3]-Y[2]^2)); > b:=simplify((Z[2]*Y[1]-Z[1]*Y[2])/(Y[1]*Y[3]-Y[2]^2)); > c:=simplify((Z[2]*Y[3]-Z[3]*Y[2])/(Y[1]*Y[3]-Y[2]^2)); > d:=simplify((Z[3]*Y[1]-Z[2]*Y[2])/(Y[1]*Y[3]-Y[2]^2)); > Matrix([[a,c],[b,d]]); > end:' shape(); shape(<(R+r*cos(u))*cos(v),(R+r*cos(u))*sin(v), > r*sin(u)>); shape(Ennep); cylinder:=; shape(cylinder); plot3d(subs(R=2,cylinder),u=0..2*Pi,v=0..3,shading=XY, > lightmodel=light1,grid=[25,10],orientation=[-46,61]); shape(); Eigenvalues(shape_matrix()); Determinant(shape_matrix()); shape(); surfrev:=; shape_matrix(surfrev); Determinant(shape_matrix(surfrev)); normal_curvature:=proc(X,u0,v0,t) > local S; > S:=subs({u=u0,v=v0},shape_matrix(X)); > DotProduct(S.,,conjugate= > false); > end: normal_curvature(<(R+r*cos(u))*cos(v), > (R+r*cos(u))*sin(v),r*sin(u)>,0,0,t); plot(normal_curvature(subs({R=5,r=1},<(R+r*cos(u))* > cos(v),(R+r*cos(u))*sin(v),r*sin(u)>),0,0,t),t=0..2*Pi); plot(normal_curvature(,0,0,t),t=0..2*Pi); evalf(Pi/4); maximize(normal_curvature(,0,0,t),t=0..2*Pi, > location=true); rule_surf:=proc(beta,delta) > simplify(beta+v*delta,symbolic); > end: plot3d(rule_surf(,<0|1|1>),u=0..2*Pi, > v=-1..1,scaling=constrained,shading=XY,orientation= > [-24,63]); plot3d(rule_surf(,<0|1|u>),u=-1..1,v=-1..1, > scaling=constrained,shading=XY,lightmodel=light2, > orientation=[-74,71]); plot3d(rule_surf(,map(diff, sin(u)|u>,u)),u=0..3.5*Pi,v=-4..4,scaling=constrained,shading > =XY,lightmodel=light2,orientation=[-133,73],grid=[50,20]); plot3d(rule_surf(,map(diff, sin(u)|u>,u)),u=0..3.5*Pi,v=0..4,scaling=constrained,shading > =XY,lightmodel=light2,orientation=[-133,73],grid=[50,10]); shape(rule_surf(,map(diff, sin(u)|u>,u))); shape_matrix(rule_surf( > ,map(diff,,u))); Determinant(shape_matrix(rule_surf( > ,map(diff,,u)))); plot3d(rule_surf(<0|0|sin(u)>,),u=0.. > 2*Pi,v=-1..1,scaling=constrained,shading=XY,lightmodel > =light2,orientation=[-27,54]); plot3d(rule_surf( sin(2*u)>,map(diff, |sin(2*u)>,u)),u=0..3.5*Pi,v=-2..2,scaling=constrained, > shading=XY,lightmodel=light2,orientation=[38,43], > grid=[40,20]); cu:=tubeplot(convert( sin(2*u)>,list),u=0..2*Pi,radius=0.015,color=black, > numpoints=200,scaling=constrained): sphere1:=plot3d(, > u=0..2*Pi,v=-Pi/2..Pi/2): display({cu,sphere1},style=wireframe,scaling= > constrained,shading=XYZ,lightmodel=light3, > orientation=[38,43]); display({cu,sphere1},scaling=constrained, > shading=XYZ,lightmodel=light3,orientation=[38,43]); with(plots): with(plots): fsolve(JacobiSN(u,k1)=1,u); plot({JacobiSN(u,k1),JacobiCN(u,k1),JacobiDN(u,k1)}, > u=-1.854074677..3*1.854074677); delau:=[-a*(1-epsilon)*(EllipticK(kk)+ > EllipticF(JacobiSN(u,kk),kk))-a*(1+epsilon)* > (EllipticE(kk)+EllipticE(JacobiSN(u,kk),kk)),a*(1+epsilon)* > JacobiDN(u,kk)*cos(v),a*(1+epsilon)*JacobiDN(u,kk)*sin(v)]; with(plots): plotund:=proc(a,eps,theta,phi) > local kk,uu; > kk:=2*sqrt(eps)/(1+eps); > uu:=fsolve(JacobiSN(u,kk)=1,u); > plot3d(subs({u=u(t),v=v(t)},[-a*(1-eps)*(EllipticK(kk)+ > EllipticF(JacobiSN(u,kk),kk))-a*(1+eps)*(EllipticE(kk)+ > EllipticE(JacobiSN(u,kk),kk)),a*(1+eps)*JacobiDN(u,kk)* > cos(v),a*(1+eps)*JacobiDN(u,kk)*sin(v)]),u=-uu..uu,v=0..2*Pi, > scaling=constrained,axes=boxed,orientation=[theta,phi], > shading=XY,lightmodel=light3); > end: plotund(1,0.7,-79,70); plotund(1,0.3,-65,70); EFG(subs(kk=2*sqrt(epsilon)/(1+epsilon),delau)); lmn(subs(kk=2*sqrt(epsilon)/(1+epsilon),delau)); MK:=proc(X) > local E,F,G,l,m,n,S,T; > S:=EFG(X);T:=lmn(X); > E:=S[1];F:=S[2];G:=S[3]; > l:=T[1];m:=T[2];n:=T[3]; > simplify((G*l+E*n-2*F*m)/(2*E*G-2*F^2),sqrt,trig,symbolic); > end: MK(subs(kk=2*sqrt(epsilon)/(1+epsilon),delau)); ccposR:= -1/sqrt(2)*sin(u)*cos(v)|-1/sqrt(2)*sin(u)*sin(v)>; ccposL:= 1/sqrt(2)*sin(u)*cos(v)|1/sqrt(2)*sin(u)*sin(v)>; ccpos1:=plot3d(ccposR,u=-1..0,v=0..2*Pi): ccpos2:=plot3d(ccposL,u=-1..0,v=0..2*Pi): display({ccpos1,ccpos2},scaling= > constrained,shading=z,lightmodel=light2,orientation=[88,60]);