# Rectangle on Plane

This topic is 3862 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a Plane, which is given by a point and a normal, and two points (PosMin, PosMax) which are also on the plane. How can I calculate the two Vectors "defining" the Rectangle on the plane? (The two vectors which fulfill PosMin + v1 + v2 = PosMax)

##### Share on other sites
There are no 'the' two vectors. Given your constraints, there are an infinite number of possible rectangles.

##### Share on other sites
you cant really. You'll need a second vector to decide the orientation on the plane.

For all you know, v1 could be (PosMax - PosMin), and v2 = Vector(0, 0, 0);

##### Share on other sites
Well, the two points on the plane should the min/max position of the rectangle.

What I'm searching for is the resulting Rectangle if I intersect the plane with the AABB defined by PosMin/PosMax.

[EDIT] isn't the orientation of the plane given by the normal?

ah, the equation posmin + v1 + v2 = posmax isn't what i'm searching for.

i'm actually searching for the other two points (not posmin, posmax) on the borders of the rectangle.

##### Share on other sites
Quote:
 Original post by Thomas MWell, the two points on the plane should the min/max position of the rectangle.

min/max in what coordinate system? You have a plane, but still have a degree of freedom on that plane. To visualize this, try it on a piece of paper, or Paint.

Draw two points. Now draw a rectangle with those two points. Okay, you drew one. Now draw another one, a different one. I think you'll find that it's possible. Rotate the paper if it helps. Now draw another one, and another one, etc. So which one is the 'right' one? :)

##### Share on other sites
posmin and posmax are in the same 3d coordinate system the plane is (x, y, z).

for each point in the rectangle it should be posmin.x < x < posmax.x, posmin.y < y < posmax.y and posmin.z < z < posmax.z.

imagine there is an AABB defined by posmin and posmax, i'm searching for the rectangle which results if i intersect my plane with the AABB.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 11
• 15
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
634151
• Total Posts
3015825
×