Calculating some geometric quantities in Surfaces
Author
Sujit Bhattacharyya
Title
Calculating some geometric quantities in Surfaces
Description
This Mathematica notebook is developed to study various geometric quantities in theory of surfaces.
Category
Working Material
Keywords
surface, first fundamental form, gaussian curvature
URL
http://www.notebookarchive.org/2023-04-0i11dfi/
DOI
https://notebookarchive.org/2023-04-0i11dfi
Date Added
2023-04-01
Date Last Modified
2023-04-01
File Size
34.8 kilobytes
Supplements
Rights
Redistribution rights reserved



Calculating some geometric quantities in Surfaces
Calculating some geometric quantities in Surfaces
Sujit Bhattacharyya
This notebook takes three components of a surface patch as input and gives its image, equation of the tangent plane, normal of the surface, components of the First and Second fundamental form. I heartily thank Dr. Ravikumar Panchal and Dr. Abdulvahid Hasmani for sharing their Mathematica script in Wolfram Notebook Archive [ Ravikumar Panchal, Abdulvahid Hasmani, “Algebraic Computations of Riemann, Ricci, Weyl Tensor” from the Notebook Archive (2022), https://notebookarchive.org/2022-06-1uzoqzd ]
(*InitiatingSessiontime*)initTime=SessionTime[];(*Fixingcoordinates*)coor={u,v};(*Takinginputofcomponentsofthesurfacepatch*)DialogInput[DialogNotebook[{TextCell["Enter the components of σ(u,v) in the next dialogue box."],Button["Proceed",DialogReturn[]]},WindowTitle"Information"]]surfacePatch=DialogInput[{sig1=0,sig2=0,sig3=0},Grid[{{Subscript["σ","1"],InputField[Dynamic[sig1]],Subscript["σ","2"],InputField[Dynamic[sig2]],Subscript["σ","3"],InputField[Dynamic[sig3]]},{Button["Confirm",DialogReturn[{sig1,sig2,sig3}],ImageSize->Automatic]}}],WindowTitle"Enter Data"];(*CalculatingTangentplaneatapoint*)tangentPlane=FullSimplify[Cross[D[surfacePatch,u],D[surfacePatch,v]]];tangentPlaneEqn=tangentPlane[[1]]x+tangentPlane[[2]]y+tangentPlane[[3]]z;(*CalculatingNormaltothesurface*)normalVec=FullSimplify[Cross[D[surfacePatch,u],D[surfacePatch,v]]/Norm[Cross[D[surfacePatch,u],D[surfacePatch,v]]]/.Abs[x_]:>Sqrt[x^2]];(*FirstFundamentalForm*)E1=FullSimplify[Norm[D[surfacePatch,u]]^2/.Abs[x_]:>Sqrt[x^2]];F1=FullSimplify[D[surfacePatch,u].D[surfacePatch,v]];G1=FullSimplify[Norm[D[surfacePatch,v]]^2/.Abs[x_]:>Sqrt[x^2]];(*ConstructingmetricandRiemannCurvature*)metric={{E1,F1/2},{F1/2,G1}};gup=Inverse[metric];gama=Table[(1/2)(D[metric[[i,k]],coor[[j]]]+D[metric[[j,k]],coor[[i]]]-D[metric[[i,j]],coor[[k]]]),{i,2},{j,2},{k,2}];gamaup=FullSimplify[Table[Sum[gup[[h,k]]gama[[i,j,k]],{k,2}],{h,2},{i,2},{j,2}]];(******RiemannCurvature*****)riemannCurv=TableFullSimplifymetric[[s,k]]D[gamaup[[s,h,j]],coor[[i]]]-metric[[s,k]]D[gamaup[[s,i,j]],coor[[h]]]+metric[[s,k]](gamaup[[l,h,j]]gamaup[[s,i,l]]-gamaup[[l,i,j]]gamaup[[s,h,l]]),{h,2},{i,2},{j,2},{k,2};(*GaussianCurvature*)gaussianCurv=FullSimplify[riemannCurv[[1,2,1,2]]/Det[metric]];(*SecondFundamentalForm*)L1=FullSimplify[D[surfacePatch,u,u].normalVec];M1=FullSimplify[D[surfacePatch,u,v].normalVec];N1=FullSimplify[D[surfacePatch,v,v].normalVec];(*Additionaltestingvariables*)Rflat=0;
2
∑
s=1
2
∑
s=1
2
∑
s=1
2
∑
l=1
(*OutputSection*)Print[Style["********* OUTPUT *********",FontSize16,FontColorBlue,FontWeightBold]]Print[Style["Surface Image",FontSize16,FontWeight"Thin"]]Manipulate[ParametricPlot3D[{surfacePatch[[1]],surfacePatch[[2]],surfacePatch[[3]]},{u,-a,a},{v,-b,b}],{{a,1,"Range of u:"},1,10},{{b,1,"Range of v:"},1,10}]Print[Style["Given Surface Patch : ",FontColorBlue,FontSize14],Style["σ(u,v) = ",FontSize14],Style[surfacePatch,FontSize14]]Print[Style["Equation of the tangent plane at (u,v) is : ",FontColorBlue,FontSize14],Style[tangentPlaneEqn,FontSize14],Style[" = 0",FontSize14]]Print[Style["Normal of the surface at (u,v) is : ",FontColorBlue,FontSize14]]Print[Style[normalVec,FontSize14]]Print[Style["Components of the First Fundamental Form are : ",FontColorBlue,FontSize14]]Print[Style["E = ",FontSize14],Style[E1,FontSize14]]Print[Style["F = ",FontSize14],Style[F1,FontSize14]]Print[Style["G = ",FontSize14],Style[G1,FontSize14]]Print[Style["The non-zero components of Christoffel Symbols (Second kind) upto symmetry are",FontColorBlue,FontSize14]]For[h=1,h<=2,h++,For[i=1,i<=2,i++,For[j=i,j<=2,j++,If[gamaup[[h,i,j]]=!=0,Print[Subscript[Superscript["Γ",h],i,j]," = ",gamaup[[h,i,j]]]]]]]Print[Style["The non-zero components of Riemann Tensor (",FontColorBlue,FontSize14],Style[Subscript["R","hijk"],FontColorBlue,FontSize14],Style[") are",FontColorBlue,FontSize14]]outPutTextRiem="";tempRiem=riemannCurv;For[h=1,h<=2,h++,For[i=1,i<=2,i++,For[j=1,j<=2,j++,For[k=1,k<=2,k++,If[tempRiem[[h,i,j,k]]=!=0,Rflat=1;tempR=tempRiem[[h,i,j,k]];outPutTextRiem=outPutTextRiem<>"R"<>ToString[h]<>ToString[i]<>ToString[j]<>ToString[k]<>" = ";For[h1=1,h1<=2,h1++,For[i1=1,i1<=2,i1++,For[j1=1,j1<=2,j1++,For[k1=1,k1<=2,k1++,If[FullSimplify[tempR+tempRiem[[h1,i1,j1,k1]]]===0,If[h1=!=h||i1=!=i||j1=!=j||k1=!=k,outPutTextRiem=outPutTextRiem<>"-R"<>ToString[h1]<>ToString[i1]<>ToString[j1]<>ToString[k1]<>" = "];tempRiem[[h1,i1,j1,k1]]=0,If[FullSimplify[tempR-tempRiem[[h1,i1,j1,k1]]]===0,If[h1=!=h||i1=!=i||j1=!=j||k1=!=k,outPutTextRiem=outPutTextRiem<>"R"<>ToString[h1]<>ToString[i1]<>ToString[j1]<>ToString[k1]<>" = "];tempRiem[[h1,i1,j1,k1]]=0]]]]]];Print[outPutTextRiem,riemannCurv[[h,i,j,k]]];outPutTextRiem=""]]]]]If[Rflat==0,Print[Style["The Surface has vanishing Riemann Curvature.",FontColorRed,FontSize14]]]If[gaussianCurv===0,Print[Style["The Surface is Developable",FontSize14,FontColorRGBColor[0,0.51,0]]],Print[Style["Gaussian Curvature = ",FontSize14,FontColorBlue],Style[gaussianCurv,FontSize14]]]Print[Style["Components of the Second Fundamental Form are : ",FontColorBlue,FontSize14]];Print[Style["L = ",FontSize14],Style[L1,FontSize14]]Print[Style["M = ",FontSize14],Style[M1,FontSize14]]Print[Style["N = ",FontSize14],Style[N1,FontSize14]](*TerminationSessiontime*)termTime=SessionTime[];(*Computationtime*)time=termTime-initTime;Print["Elapsed Time = ",Floor[N[time/3600]]," hr ",Floor[N[Floor[N[Mod[time,3600]]]/60]]," min ",Floor[Mod[Floor[N[Mod[time,3600]]],60]]," sec "];


Cite this as: Sujit Bhattacharyya, "Calculating some geometric quantities in Surfaces" from the Notebook Archive (2023), https://notebookarchive.org/2023-04-0i11dfi

Download

