Given two planes P1: a1 * x + b1 * y + c1 * z + d1 = 0 and P2: a2 * x + b2 * y + c2 * z + d2 = 0. The task is to find the angle between these two planes in 3D.
Input: a1 = 1, b1 = 1, c1 = 2, d1 = 1, a2 = 2, b2 = -1, c2 = 1, d2 = -4
Output: Angle is is 60.0 degree
Input: a1 = 2, b1 = 2, c1 = -3, d1 = -5, a2 = 3, b2 = -3, c2 = 5, d2 = -6
Output: Angle is 123.696598882 degree
Approach: Consider the below equations of given two planes:
P1 : a1 * x + b1 * y + c1 * z + d1 = 0 and, P2 : a2 * x + b2 * y + c2 * z + d2 = 0,
where a1, b1, c1, and a2, b2, c2 are direction ratios of normal to the plane P1 and P2.
The angle between two planes is equal to the angle determined by the normal vectors of the planes.
Angle between these planes is given by using the following formula:-
Cos A =
Using inverse property, we get:
Below is the implementation of the above formulae:
Angle is 60.0 degree
- Exterior angle of a cyclic quadrilateral when the opposite interior angle is given
- Angle between a chord and a tangent when angle in the alternate segment is given
- Distance between two parallel Planes in 3-D
- Angle subtended by the chord to center of the circle when the angle subtended by the another equal chord of a congruent circle is given
- Angle subtended by the chord when the angle subtended by another chord of same length is given
- Arc length from given Angle
- Find if it's possible to rotate the page by an angle or not.
- Check if it is possible to create a polygon with a given angle
- Find other two sides of a right angle triangle
- Program to print binary right angle triangle
- Find other two sides and angles of a right angle triangle
- Area of a largest square fit in a right angle triangle
- Maximum number of squares that can fit in a right angle isosceles triangle
- Find a time for which angle between hour and minute hands is given theta
- Program to find the Interior and Exterior Angle of a Regular Polygon
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.