user3511075
user3511075

Reputation: 23

Calculate rectangle's points from diagonal in 3D

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#.)

Upvotes: 2

Views: 945

Answers (2)

Paul S.
Paul S.

Reputation: 1

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.

Upvotes: 0

borkovski
borkovski

Reputation: 978

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.

Upvotes: 2

Related Questions