# Find points on a triangle

In the diagram below, I have all the points working except c,d,e,f. I need to find these points.

cp and ep are known points. I dynamically calculate a and b with cp -> ep vector's perpendicular multiplied by the radius of the circle. That allows me to draw the triangle a,b,ep. mp is found by taking the average point (distance) between cp and ep.

What would be the easiest way to calculate points c, d, e, and f? They are points on the triangle variable (arbitrary) position. Points c,d,e,f should, as a group, maintain an average distance between or center between cp and ep. mp is the center of the c,d,e,f point group so to speak.

-
It is not clear the properties of c, d, e and f. "Like mp they maintain center between cp and ep." Can you explain this? – the_candyman Feb 6 '13 at 8:33
@the_candyman point c,d,e,f should, as a group, maintain an average distance between or center between cp and ep. mp is the center of the c,d,e,f point group so to speak. – Mrwolfy Feb 6 '13 at 8:40
have you tried to describe lines and the circle with equation? Once you have the equations of the lines, you can impose condition on distance or center for points c and on line a-ep and for points d and f on line b-ep – the_candyman Feb 6 '13 at 8:53
@the_candyman I think I did something similar to what you suggested, and it worked. The solution was a bit complicated. Thanks! – Mrwolfy Feb 6 '13 at 14:28

Express points along the sides of the triangle in barycentric coordinates (note figure) relative to the vertices $\textbf{a}, \textbf{b}, \textbf{ep}$.

Barycentric coordinates are nonnegative and constrained to add to 1: $\lambda_1 + \lambda_2 + \lambda_3 =1$, $\lambda_i \geq 0$ and the vertices are arranged as columns in a matrix $\textbf{R}=[\textbf{a}|\textbf{b}|\textbf{ep}]$.

Known points on your triangle are expressed as: $\textbf{mp} = (1/3,1/3,1/3)^t \textbf{R}$ and $\textbf{cp} = (1/2,1/2,0)^t \textbf{R}$.

Then for example, $\textbf{c} = (\lambda_1,0,1-\lambda_1)^t \textbf{R}$, for any choice of $\lambda_1 > 1/2$. (Note that the 2nd barycentric coordinate is 0 because $\textbf{c}$ lies on the side containing $\textbf{a},\textbf{ep}$.

By symmetry you can see how to the express the other points $\textbf{d},\textbf{e},\textbf{f}$. They will "maintain an average distance between or center between cp and ep" as long as the same value of the nonzero baricentric coordinate is used throughout (there will always be 2 nonzero coordinates, and one can be expressed in terms of the other as above).

Note there is no assumption that the triangle be isosceles or that it be contained in $\mathbb{R^2}$.

-