Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am attempting to calculate the mean curvature [1, 2] of a surface defined by a function of x and y.

My function is rather simple:

f = 1 - 0.05(Cos[2 π x/L] + Sin[2 π x/L])Cos[2 π y/L];

So to calculate the mean curvature, this is what I do (κ is the mean curvature below):

L=79.1829;
f = 1 - 0.05(Cos[2 π x/L] + Sin[2 π x/L])Cos[2 π y/L];
κ=((1 + D[f,x]^2) D[f,y,y]-2 D[f,x]D[f,y]D[D[f,x],y]+
  (1+D[f,y]^2)D[f,x,x])/((1 + D[f,x]^2 + D[f,y]^2)^1.5)

And then I plot it as :

(*Surface defined by f*)
Plot3D[
  f,
  {x, 0, L},
  {y, 0, L}
  ]

enter image description here

 (*Plot of kappa*)
 Plot3D[
  κ,
  {x, 0, L},
  {y, 0, L}
  ]

enter image description here

  1. I wasn't entirely sure of whether to post this question in math.se or mathematica.se but I did so on mathematica.se since it does have a Mathematica component to it.

  2. Is what I am doing correct? I ask because this seems rather trivial.

  3. Does anyone have any suggestion as to do this in a better way, perhaps plot it in a better way?

A little background:


I am trying to prove quantitatively that different initial conditions created by the surface like f would engender different amounts of curvature for a fluid dynamics problem.

share|improve this question
1  
Read thoroughly e.g. : mathematica.stackexchange.com/questions/8895/… –  Artes Nov 5 '12 at 14:32
1  
That's a surface, not a curve... anyway, I gave a routine for the mean curvature here. –  J. M. Nov 5 '12 at 14:34
    
@Artes I actually did. Doesn't seem to be the same thing. It does have certain functions that would be interesting though. –  drN Nov 5 '12 at 14:34
    
@J.M. Oops! Will make the edit! –  drN Nov 5 '12 at 14:35
1  
A great way to test formulas or code involving curvature is to apply it to objects with known curvature. In this case, when you compute the mean curvature function for a unit sphere you get a constant value of $2$, which is correct. Good test objects (in 3D) for mean curvatures include spheres (of various sizes), any soap bubble (which should have zero mean curvature everywhere), tori, ruled surfaces, and surfaces of revolution. –  whuber Nov 5 '12 at 16:19
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.