In-Polyhedron Test
Popularity: 69% [?]
Related Posts
Comments
2 Comments on In-Polyhedron Test
-
tolga on
Fri, 16th Oct 2009 19:23
hello.. this looks like a quite useful code…
but there is a problem i cannot figure out.
i have the parameters for a surface : triangles, points and normals.
my problem starts here: the normals are not normals for triangles but they are normals at the points.
however your function requires the normals for triangles. Is there a way to estimate the normals for triangles from the normals of the points, so that I can use your function?
i will be so glad to hear your any possible solution for this.
thank you in advance.
[Reply]
Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!
Include MATLAB code in your comment by doing the following:
<pre lang="MATLAB">
%insert code here
</pre>


















































Luigi Giaccari Reply:
October 16th, 2009 at 22:57
To get the normals of triangles you don’t need to have normals in points.
If you have Matlab R2009a you can use the computational geometry toolbox to get a conform outward normal for each triangle. There is a built in function.
To get your own code you need to compute the nomral for one triangle (use cross product) and then perform a propagation on the neighborhood triangles keeping the orientation of normals. It is not the easiest thing but not even the most diffucult, try it and let me know.
Luigi
[Reply]