曲线的基本性质

r[t_]=Input["曲线的参数方程为"];cond=(Input["参数限制条件为(用&&分割)"])&&t∈Reals;simpcond=Simplify[#,cond]&;
gamma=simpcond[r'[t]\[Cross]r''[t]];
{α,γ}=simpcond@{((r'[t])/(Norm[r'[t]])),(gamma/(Norm[gamma]))};β=simpcond[γ\[Cross]α];
{κ,τ}=simpcond@{((Norm[gamma])/((Norm[r'[t]])^3)),((gamma.r'''[t])/((Norm[gamma])^2))};
s[t_]=Simplify@Integrate[Norm[r'[t]],{t,0,t},Assumptions->cond];
Print["曲线的参数方程是", r[t],"，其弧长参数s=",s[t],
"；\n 曲线的Frenet标架{α,β,γ}=",{α,β,γ},
"；\n 曲线的曲率κ=",κ,"，挠率τ=",τ,"。"]

曲面的基本性质

r[u_,v_]=Input["曲面的参数方程为(参数为u和v)"];cond=(Input["参数限制条件为(用&&分割)"])&&u∈Reals&&v∈Reals;simpcond=Simplify[#,cond]&;
{r1,r2}=simpcond@{D[r[u,v],u],D[r[u,v],v]};n=simpcond@((r1\[Cross]r2)/(Norm[r1\[Cross]r2]));
{E0,F0,G0,L0,M0,N0}=simpcond@{r1.r1,r1.r2,r2.r2,D[r1,u].n,D[r1,v].n,D[r2,v].n};
FormI[λ_,μ_]=E0 (λ^2)+2F0 λ μ+G0 (μ^2);FormII[λ_,μ_]=L0 (λ^2)+2M0 λ μ+N0 (μ^2);
WeinTransMat=simpcond[{{L0,M0},{M0,N0}}.Inverse[{{E0,F0},{F0,G0}}]];
{k1,k2}=Eigenvalues[WeinTransMat];
Print["曲面的参数方程是", r[u,v],
"；\n 曲面的自然标架{(Subscript[r, u]),(Subscript[r, v]),n}=",{r1,r2,n},
"；\n 曲面的第一类基本量是E=",E0,",F=",F0,",G=",G0,"，第一类基本形式为",FormI[du,dv],
"；\n 曲面的第二类基本量是L=",L0,",M=",M0,",N=",N0,"，第二类基本形式为",FormII[du,dv],
"；\n 单位切向量w=(Subscript[λr, u])+(Subscript[μr, v])的法曲率是",FormII[λ,μ],
"；\n Weingarten变换的变换矩阵((Subscript[b, α]^β))为",MatrixForm@WeinTransMat,"，主曲率为",{k1,k2},"，相应主方向为",Eigenvectors[WeinTransMat],
"；\n 平均曲率H=",((k1+k2)/2),"，Gauss曲率K=",k1 k2,
"；\n \!\(\*SubsuperscriptBox[\(Christoffel符号Γ\), \(α,β\), \(γ\)]\)为：(Subscript[Γ, 1,1]^1)=",((G0 D[E0,u]+F0 D[E0,v]-2F0 D[F0,u])/(2(E0 G0-(F0^2)))),",(Subscript[Γ, 1,2]^1)=(Subscript[Γ, 2,1]^1)=",((G0 D[E0,v]-F0 D[G0,u])/(2(E0 G0-(F0^2)))),",(Subscript[Γ, 1,1]^2)=",((-F0 D[E0,u]-E0 D[E0,v]+2E0 D[F0,u])/(2(E0 G0-(F0^2)))),",(Subscript[Γ, 2,2]^1)=",((2G0 D[F0,v]+G0 D[G0,u]-F0 D[G0,v])/(2(E0 G0-(F0^2)))),",(Subscript[Γ, 1,2]^2)=(Subscript[Γ, 2,1]^2)=",((E0 D[G0,u]-F0 D[E0,v])/(2(E0 G0-(F0^2)))),",(Subscript[Γ, 2,2]^2)=",((E0 D[G0,v]+F0 D[G0,u]-2F0 D[F0,v])/(2(E0 G0-(F0^2)))),"。"]

(*弧长参数？*)

$E=Input["E是"];G=Input["G是"];Print["K=",FullSimplify@-(1/(Sqrt[$E G]))(D[((D[(Sqrt[$E]),v])/(Sqrt[G])),v]+D[((D[(Sqrt[G]),u])/(Sqrt[$E])),u])]