Plot of 3D surface from normals and points

I have a set of points (x, y, z) with the corresponding normals and values ​​at these points. So the data is in form [x y z nx ny nz c]. I want to build a three-dimensional surface above these points that is perpendicular to these normals and has a color that matches the value. So I want partly the opposite surfnorm.

I managed to build a surface with meshgrid, interp2and surf, but that doesn't take into account the normals. I also got the idea to make a surface by building small squares perpendicular to the normals. I managed to do this, but I see no way to “fill” the space between the squares, because the points are irregularly spaced.

What is a good way to do this?

+4
source share
1 answer

I see two options:

1) Either do a direct geometric reconstruction using polygons based on points and normals. I think the function patchwould be useful in this context. It allows you to set the color. Disadvantage: you will need to perform manual processing and exception handling.

2) , , . 2D . , , x, y, z, - nx, ny, nz. : , .

+1

All Articles