I know 3 points in a 3D plane. Two points are the ends of a diagonal and an other one which is random point on the plane. How can I calculate the two other points of a rectangle from the known diagonal line? (Later I will use the points to calculate the perimeter of the rectangle in C#.)
Asked
Active
Viewed 882 times
2
-
Isn't this more related to MathOverflow? – Uwe Keim Apr 08 '14 at 13:22
-
Please ask this at the more related TaxonomyOverflow. :) – user3511075 Apr 08 '14 at 14:03
2 Answers
2
There's no single right answer. All you can calculate using a diagonal and a random point on the plane is a whole sets of possible answers. Imagine rotating the diagonal to create a circle - now every second line inscribed in that circle and going through the center can be the second diagonal. The only limit is your third point.

borkovski
- 938
- 8
- 12
0
Since you know the end points of the diagonal, you can calculate the length of the diagonal; from there you can determine the rectangle side length; having diagonal coordinates and the side length, you can determine the other two points of the rectangle using add/subtraction.

Paulo Moura
- 18,373
- 3
- 23
- 33

Paul S.
- 1
- 1
-
So how can the rectangle side length be determined from the diagonal length? – user3511075 Apr 08 '14 at 13:34
-
-
Say I have a diagonal length of "5". Are the two sides ("3" and "4") or ("4" and "3"). Or even ("almost 0" and "nearly 5")? – Hans Kesting Apr 08 '14 at 13:36
-
@ Hans: Unless you can check against that 3rd point on the plane( lets say for example that 3rd point has to be inside/outside of the rectangle) he'll have indeed 2 solutions – Paul S. Apr 08 '14 at 13:40
-
That 3rd point is just "on the plane", not a corner (which *would* decide the rectangle), or even "inside the rect". – Hans Kesting Apr 08 '14 at 13:50