Specific equilateral triangle given two points in 3D - Python

127 Views Asked by At

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 (in Python) 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

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 :)

0

There are 0 best solutions below