# solving for plane equation

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

## Recommended Posts

i am trying to solve the equation for the plane ax + bx + cx = d right so i have 3 vectors const Max_Cont = 4; //each of the 4 ground plane vectores hold the values for x,yz D3DXVECTOR3 vGroundPlane[Max_Cont]; so how do i use this to get the ground plane calculation

##### Share on other sites
Quote:
 Original post by Prog101i am trying to solve the equation for the planeax + bx + cx = dright so i have 3 vectors const Max_Cont = 4;//each of the 4 ground plane vectores hold the values for x,yzD3DXVECTOR3 vGroundPlane[Max_Cont];so how do i use this to get the ground plane calculation

The plane equation is Ax + By + Cz + D = 0

Using 3 of your vectors you can find the normal of the plane they make giving you A, B and C so you can then just plug any of 3 verts back into the plane equation and solve for D.

Regards,
ViLiO

##### Share on other sites
If each of your ground plane 'vectors' is actually a point (I think that's likely), then pick any 3 of them; let's call them a, b, c.

The plane normal is (c-a)×(b-a), normalised, and the 'd' value for the plane equation is a.n.

##### Share on other sites
Quote:
 Original post by Bob JanovaIf each of your ground plane 'vectors' is actually a point (I think that's likely), then pick any 3 of them; let's call them a, b, c.The plane normal is (c-a)×(b-a), normalised, and the 'd' value for the plane equation is a.n.

I think a.n should be -(a.n) or -DOT(a,n)

Just expanding from A(x - x1) + B(y - y1) + C(z - z1) = 0 assuming a = (x1,y1,z1)

##### Share on other sites
The sign of d depends whether your plane definition is
(r.n) = d
or
(r.n) + d = 0

:).

So yeah, sorry, looking at the OP's definition you are correct, your D value is -a.n.

1. 1
2. 2
Rutin
17
3. 3
4. 4
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633735
• Total Posts
3013596
×