Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'curvature calculations from a 3D point set' topicStudent Support Forum > General > Archives > "curvature calculations from a 3D point set"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
toen
01/25/12 8:43pm

Hi Sid,

I'm not aware of any built-in package to use. If you do find any built-in functionality, please repost to let me know.

There are a few ways you can go:

1. You can generate a picture, and extract the mesh data from the GraphicsComplex. Then do mesh-based calculations for the curvatures. Use the link between Div and the Gaussian curvature (I've forgotten how to calculate mean curvature, google will tell you).

There are all kinds of subtle (and not-so-subtle) problems with this approach, if you're after precise data.


2. Alternatively do the calculations on the interpolating functions themselves, and evaluate at the mesh points. This way worked better for me. Use some equations from papers by "Alan L. Mackay" from the 80's and 90's (or others) for this. Some code for the Gaussian curvature is attached below.

Once you've got your curvatures, you can map them onto the surface by inserting a VertexColors -> (list of colour commands for each vertex) into the GraphicsComplex.

Note that if your surface is periodic, you can use the space group information to create a really good interpolation. Use the trigonometric expansions from a crystallography reference book.

To give you an idea of the usefulness I've attached an image created in this way.

cheers,
toen

>>>

GaussCurv[f_,{x_,y_,z_}]:=Module[{Id},Det[Table[j[i[f]]/.Id[Id[_]]->0/.Id->Identity,{i,{\!\(
\*SubscriptBox[\(\[PartialD]\), \(x\)]#\)&,\!\(
\*SubscriptBox[\(\[PartialD]\), \(y\)]#\)&,\!\(
\*SubscriptBox[\(\[PartialD]\), \(z\)]#\)&,Id}},{j,{\!\(
\*SubscriptBox[\(\[PartialD]\), \(x\)]#\)&,\!\(
\*SubscriptBox[\(\[PartialD]\), \(y\)]#\)&,\!\(
\*SubscriptBox[\(\[PartialD]\), \(z\)]#\)&,Id}}]]/(((\!\(
\*SubscriptBox[\(\[PartialD]\), \(x\)]f\))^2+(\!\(
\*SubscriptBox[\(\[PartialD]\), \(y\)]f\))^2+(\!\(
\*SubscriptBox[\(\[PartialD]\), \(z\)]f\))^2+10^-9)^2)];



Attachment: Screen shot 2012-01-26 at 1.40.03 PM.png, URL: ,

Subject (listing for 'curvature calculations from a 3D point set')
Author Date Posted
curvature calculations from a 3D point set sid 01/23/12 11:42am
Re: curvature calculations from a 3D point set toen 01/25/12 8:43pm
Re: curvature calculations from a 3D point set toen 01/25/12 8:51pm
Re: Re: curvature calculations from a 3D point ... sid 02/02/12 1:20pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic