# Given a quad in 3D space with two diagonally opposite points and normal, how would I find the other two points?

Image attached below for clarification:

So here we have a plane with a random rotation in 3D space, and we have the values for P1, P2, and the plane normal. How do I find the points X1 and X2?

This quad can have any width/height, any position, and any rotation.

• I think we still have one degree of freedom too many here. With two diagonally opposite points in a plane, there are multiple possible rectangles that could be drawn through them, with different aspect ratios and "twist" about the plane normal. Do you have any additional constraint we can use to pick just one of these rectangles? It may help to explain what this is used for in your game — that application may suggest a metric that makes some rectangles a better choice than others. Commented Oct 6, 2022 at 13:57
• @DMGregory Unfortunately these are all the constraints I have, other than world position and rotation. The two points are random and change at runtime. Commented Oct 6, 2022 at 14:06
• Is it OK if we always return a square then? Or do you sometimes want rectangles of different aspect ratios for your application? I'll reiterate that telling us how this is used in your game would help us find suitable solutions. Commented Oct 6, 2022 at 14:07
• To illustrate the point by @DMGregory, this rectangle would be possible as well: i.sstatic.net/ckQnP.png. You would need to know either the aspect ratio of the rectangle or its rotation angle around the plane normal to find out the other two points. Commented Oct 6, 2022 at 14:10
• @Philipp Thanks, I can see why that causes an issue. Commented Oct 6, 2022 at 14:15

Vector3 diagonal = p2 - p1;