ScratchData LogoScratchData
Back to Zro716's profile

Intersection of two planes

ZRZro716•Created August 1, 2014
Intersection of two planes
121
76
2297 views
View on Scratch

Instructions

Rotate with the arrow keys, play with the variables and observe! Blue = plane 1 Green = plane 2 Red = intersecting line perspective 0 = orthogonal view perspective 1 = perspective view, rigid perspective 2 = perspective view, panoramic

Description

Finally, I've always wanted to do this! As long as two planes are not parallel, there exists a line L that marks the intersection between them. How to find this line requires two things: the cross product of the plane normals, and any point along the intersection. Assume two planes P1 and P2 are defined in linear form as P1: Ax + By + Cz = D P2: Ex + Fy + Gz = H where <A,B,C> is the normal vector of P1 and <E,F,G> is the normal vector of P2. The planes are parallel if and only if the normal vectors are the same. To find the cross product of the normals, we set up a 3x3 matrix, using i, j, and k as the variables: | i j k | | A B C | | E F G | The cross product is equal to the determinant of this matrix, which can be calculated as: (iBG + jCE + kFA) - (kBE + jAG + iCF) which is simplified to: i(BG - CF) + j(CE - AG) + k(FA - BE) and thus, the cross product of the planar normals is vectorized as the coefficients of i, j, and k, which are the slope components of the line of intersection. Next, we find any point where the planes meet. To simplify things, we set any of the variables to zero. One check to keep in mind is if any coefficient is zero so that we don't divide by it in the end! z = 0 Ax + By = D Ex + Fy = H y=0 Ax + Cz = D Ex + Gz = H x=0 By + Cz = D Fy + Gz = H This gives us a set of two-variable equations which we can rearrange either to substitute for a variable in the other. Depending on what set you choose, you should use algebra for finding one variable, then plugging that variable back into either 2-var equation to get the second variable, then plug the two variables into the original planar equation to get the third and last variable. Whew! Now that you have a point on the intersection and its 3D slope (the cross product of the normals), you define the intersection line as line = point + t*slope Curated by @xOnic 8/27/14, thanks!

Project Details

Project ID25241256
CreatedAugust 1, 2014
Last ModifiedApril 8, 2019
SharedAugust 2, 2014
Visibilityvisible
CommentsAllowed