Get Point by Distance on Normal of a Equilateral Triangle going through middle Point

54 Views Asked by At

Given 3 arbitrary points p1,p2 and p3 in 3D-space which form a equilateral triangle plane, how do I get a point p4 by distance d on the Normal of that triangle plane which goes through the middle-point of that triangle. I provided a image below so you better understand what i mean. enter image description here

1

There are 1 best solutions below

2
On BEST ANSWER

For an equilateral triangle, calculate the center of mass: $$\vec c=\frac13(\vec p_1+\vec p_2+\vec p_3)$$ The direction of the normal can be found from the cross product of two vectors in the plane: $$\vec n=(\vec p_1-\vec p_2)\times(\vec p_1-\vec p_3)$$ Then $$\vec p_4=d\frac{\vec n}{|\vec n|}+\vec c$$