# Rotation of a plane and new value of D constant

• Oct 31st 2012, 05:30 AM
davidacce
Rotation of a plane and new value of D constant
Hello,

I am working in camera calibration project. I have a plane represented by a equation in the form: Ax+By+Cz+D=0, and I want to rotate it. Easily I can identify the new values of the coefficients A, B and C which correspond to the normal of the plane, but I donīt know how to calculate the new value of D coefficient.

Say I have an equation x+y+2z+2=0 and I want to rotate the plane 30, 45 and 30 degrees in yaw, pitch and roll respectively. I want to know how can I calculate the new value of the D constant. (btw,The values I use in this example are arbitrary :D)

I will appreciate your help on this.

Best Regards,

David
• Oct 31st 2012, 06:52 PM
chiro
Re: Rotation of a plane and new value of D constant
Hey davidacce.

The recommendation I would use for this sort of problem is to know one point of the plane before and after the rotation and then use the formula n . (r - r0) = 0 where r0 is a specific point on the plane.

You need to specify how you rotate the plane, but that technique should work for any rotation.

If you are rotating the normal then it seems that you are rotating the plane about some point on the plane and if you rotating about this point, then this point won't change at all since it will have the affect that is at the origin and rotating a point at the origin leaves it unchanged.

If you give specific rotation/translation/etc information I can give a more specific response.
• Nov 4th 2012, 11:28 PM
davidacce
Re: Rotation of a plane and new value of D constant
Hi Chiro, thanks for the answer.

I am using a 4x4 transformation matrix which contains a 3x3 rotation matrix and a 1x3 translation vector. In this moment I am not using the translation vector, so it is full with zeros. I guess this means that the rotation is done at the origin. Does it means that the D constant in the plane equation does not change?
• Nov 5th 2012, 10:30 PM
chiro
Re: Rotation of a plane and new value of D constant
If you are doing a pure rotation then you are technically rotating around the origin.

When you rotate around a point what you do is you subtract that point from every other one, do the rotation, and then translate every point by adding the rotation point back.

In matrix form this is a composition of functions or a multiplication of matrices given by TRT' where T is a translation matrix, R is a rotation matrix and T' is also a translation matrix where T' shifts the point by the negative of rotation centre, R is a rotation matrix and T translates by adding the rotation centre. When you compose all of these you rotate around an arbitary point.

All matrices above will be 4x4 and the rotation matrix will have a 1 in the lower left corner and 0's on the 4th row and column elsewhere.

You will need to decide what your T will be and then transform your planes normal and point to get the new ones with the above. Remember you need a point on the plane and a normal vector and while the normal vector won't change wherever you translate it (since it is a vector), then point will make a difference. You can use any point on the plane by the way.

Apply your above matrix to both point and normal vector and you will get your resultant normal vector and resultant point to construct new plane equation.