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
- Distance between two parallel Planes in 3-D
- Arc length from given Angle
- Check if it is possible to create a polygon with a given angle
- Find other two sides of a right angle triangle
- Find if it's possible to rotate the page by an angle or not.
- Find other two sides and angles of a right angle triangle
- Area of a largest square fit in a right angle triangle
- Program to print binary 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
- Biggest Reuleaux Triangle within a Square which is inscribed within a Right angle Triangle
- Calculate the angle between hour hand and minute hand
- Find the minimum number of rectangles left after inserting one into another
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.