|
"John D'Errico" <woodchips@rochester.rr.com> wrote in message <jqd5l1$a4b$1@newscl01ah.mathworks.com>...
> "Archak Goel" wrote in message <jqcau4$rg3$1@newscl01ah.mathworks.com>...
> > Hi!
> > I was operating on the triangulation of the holes in a stl file. There i need to compute if the normals of the triangulated facets are pointing outside the plane( away from the body), or inside the plane. In mathematical terms, i need to find if a normal is making an angle of 90 or -90, with its surface. The surface is 3 dimensional and may be closed, so the function needs to be generalized. In matlab i found no function, that can tell me that the angle is 90 or -90 (considers the sense of traversing the angle). If anyone knows, please help.
>
> This is impossible to tell, in the sense that a planar surface
> has no preferred positive or negative direction in terms of
> it as a simple plane.
>
> However, in context, a plane can be construed to have a
> positive or negative direction for the normal. For example,
> if you are generating the plane from a pair of vectors, thus
> using a cross product (and therefore the right hand rule),
> the normal vector will have a sign that depends on the
> order of the two vectors supplied.
>
> I'd suggest that what you usually want here is to know the
> orientation of the normal vector. That orientation can be
> inferred rom a dot product. If a given point is known to be
> on a specific side of the plane, then you can infer a direction.
> For example, suppose you have a three dimensional simplex,
> defined by four vertices, {A,B,C,D}.
>
> The normal vector N to the plane that contains the facet ABC
> is given by
>
> N = cross(A-B, A-C)
>
> where cross is the cross product. Does this normal vector
> point inwards or outwards from the simplex? A simple solution
> is given by the dot product
>
> dot(D-A,N)
>
> If this dot product is positive, then the facet normal vector
> is inward pointing relative to the simplex. If it is negative,
> then the normal vector points outwards.
>
> All of this never required any explicit computation of any
> angle.
>
> John
Thanks John for your explanation. That means I have to work for an algorithm to generate the points , respect to which I can determine the normal direction.
|