Generating a surface and associated normals from a set of (x,y,z) data points

3 views (last 30 days)
Hi everyone,
I'm struggling with a 3D geometry problem but I'm relatively new to MATLAB, and I wondered if someone here might be able to suggest something. It's a bit complicated to explain but let me try...
I have a set of points in 3D space parameterised by (x,y,z) Cartesian coordinates. I would like to use these points to first interpolate a surface S that passes through each of these points, and then to find the normal vectors to S at each of the original data points. I would also like each of the normal vectors to radiate away from the surface in a consistent manner i.e. always from the same face. In this way the points at the ends of each of the normal vectors could, when taken together, be regarded as defining their own surface S' that is separated from S by a distance equal to the length of the normal vector, in the local neighbourhood of each of the original points (see this sketch: https://docs.google.com/file/d/0B21EvgnYjot3a29kZ1hrQ1pZTG8/edit?usp=sharing)
Can this be done? I have been experimenting with various functions including TriScatteredInterp, delaunay and surfnorm with little success so far.
Would be very grateful for any ideas!
Thank you very much,
Rhydian
  1 Comment
Matt Kindig
Matt Kindig on 5 Aug 2013
What have you tried so far? The various functions that you have listed could be useful for this task? I guess I'm not clear why your existing approaches have failed. Could you post some code?
For the surface normals, see the surfnorm() command.

Sign in to comment.

Answers (1)

Rose Haft
Rose Haft on 13 Sep 2018
The surfnorm command doesn't always work on the edges. Are there are other suggestions?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!