0

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

MXu
  • 1
  • 1
  • Perhaps you should address this question to a mathematics website. – khelwood Apr 16 '21 at 19:49
  • What if the points for A and B result such that the circle of possible values for point C are all on the same Z plane? Also what code have you tried? – Roman Czerwinski Apr 16 '21 at 19:49
  • Hi! Thanks for the quick reply! Yes 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 :) – MXu Apr 16 '21 at 19:53
  • I think this is off-topic because it is more of a geometry question than a programming question. – khelwood Apr 17 '21 at 15:21

0 Answers0