P1p2p3
%inside_triangle is used to check if a point P is inside%the triangle P1P2P3 or not.%%Inputs: P, P1, P2 and P3 are vectors of length 2 or three of the% form [x y z] or [x y]%%Output: True%True=1 => P is on or inside P1P2P3%True=0 => P is outside P1P2P3%%Example:%True=inside_triangle([0.5 0.5],[0...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (44): inside triangle Download |
Calculation of intersection segment between a plane (defined with a point p0 that lies on the plane and a normal vector n of that plane) and a triangle (defined with its vertices P1, P2 and P3)N : Normal to plane , |N| = 1, N->(nx3)Q : Point into the plane, Q->(nx3)P1,P2,P3 : Triangle vertices,...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 20.48 KB | Download (44): IntersectPlaneTriangle mex Download |
Calculate the distance of a given point P from a triangle TRI.Point P is a row vector of the form 1x3. The triangle is a matrix formed by three rows of points TRI = [P1;P2;P3] each of size 1x3. dist = pointTriangleDistance(TRI,P) returns the distance of the point P to the triangle TRI. [dist,PP0]...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (39): Distance between a point and a triangle in 3D Download |