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 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
- Program to calculate angle on circumference subtended by the chord when the central angle subtended by the chord is given
- Distance between two parallel Planes in 3-D
- Maximum number of line intersections formed through intersection of N planes
- 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
- Angle subtended by an arc at the centre of a circle
- Find other two sides of a right angle triangle
- 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
- Angle between 3 given vertices in a n-sided regular polygon
- Find other two sides and angles of a right angle triangle
- Area of a largest square fit in a right angle triangle
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.