Outward pointing normal vectors on a triangle
15 views (last 30 days)
I'm using the Galerkin method to solve a heat convection problem in 2d.
I have a triangle and I've found the normal vectors to the triangle side.
%Length of one side: a1 = sqrt((x3-x2)^2+(y3-y2)^2);
%Normal vector: n1 = [(x3-x2),y3-y2]./a1;
The problem is that I don't know how to make matlab make the normal vectors point outwards automatically.
So if anyone has a suggestion please tell me.