Let's say I have two points: $A = (x_0, y_0, z_0)$ and $B = (x_1, y_1, z_1)$.
How can I find a third point $C = (x_2, y_2, z_2)$ such that:
a) $A, B$ & $C$ form an equilateral triangle
b) the value of $z_2$ is the highest it can be
Yes so I'm looking for a 2d triangle in 3D space. So what I think I know is that the space of solutions that match criteria (a) fits on a 2d circle that emanates from $(A+B)/2$ of radius $||(A+B)/2||*sqrt(3)$. To match criteria (b) I've thought about iterating over the values of that circle until I find an approximation of the largest $z_2$ but am looking for a more closed-form solution. Thanks a lot :)
The third point C lies on the straight line obtained by simplifying
$$ (x-x1)^2+(y-y1)^2+(z-z1)^2=(x-x0)^2+(y-y0)^2+(z-z0)^2=(x1-x0)^2+(y1-y0)^2+(z1-z0)^2 $$