Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Geometric algebra solution for intersection of planes in RN

  1. Mar 4, 2008 #1
    Given the parametric representation of two planes, through points P and Q respectively

    x = P + \alpha u + \beta v
    y = Q + a w + b z

    Or, alternately, with [tex]u \wedge v = A[/tex], and [tex]w \wedge z = B[/tex]

    x \wedge A = P \wedge A

    y \wedge B = Q \wedge B

    It's easy enough to find the intersection of the two planes by wedging, x = y, with A or B. For example, if I wedge with B I get a parametric equation for the line of intersection, provided it exists:

    x = P + \frac{(Q-P)\wedge B}{v \wedge B}}v + \alpha\frac{1}{v \wedge B}((v \wedge B) u - (u \wedge B)v)

    Intuitively, I'd expect that one could reduce this to an expression in terms of only P, Q, A, and B without requiring an explicit pair of direction vectors in the plane (the points and the bivectors specify the planes and their position, so I'd expect the intersection to be expressable that way too).

    I don't see how to obviously do the reduction I'd imagine possible here (I'm self teaching myself geometric algebra as it appears to be the natural language for much of physics which I'd like to understand better ... to get a feel for things I was going through some of the sorts of calculations learned with traditional means such as row reduction, and this was one I tried.)
    Last edited: Mar 5, 2008
  2. jcsd
  3. Mar 5, 2008 #2
    I couldn't reproduce your expression because I didn't
    quite understand exactly what you did. Instead, I
    offer the following solution, which I think satisfies
    what you felt intuitively.

    Let the first plane be defined by the point p and
    the unit bivector P. Let the second plane be defined
    by the point q and the unit bivector Q. The equations
    for the planes are

    [tex]x\wedge P = p\wedge P[/tex]

    [tex]x\wedge Q = q\wedge Q[/tex]

    These must be satisfied simultaneously for any point x
    on the intersection of the two planes. Let us now find
    the point that is on the intersection line and that is
    a linear combination of the points p and q.

    [tex] t = \alpha p + \beta q[/tex]

    Insert this into the simultaneous equations to yield two
    linear equations determining [tex]\alpha[/tex] and [tex]\beta[/tex]:

    \alpha\ p\wedge{ P} + \beta\ q\wedge{ P} = p\wedge{ P} [/tex]

    \alpha\ p\wedge{ Q} + \beta\ q\wedge{ Q} = q\wedge{ Q}

    These can be solved with Cramer's rule:

    \alpha = (p\wedge{ P}\ \ q\wedge{ Q}
    -q\wedge{ Q}\ \ q\wedge{ P})/\delta [/tex]

    [tex] \beta = (p\wedge{ P}\ \ q\wedge{ Q}
    -p\wedge{ Q}\ \ p\wedge{ P})/\delta [/tex]

    [tex] \delta = (p\wedge{ P}\ \ q\wedge{ Q}
    -p\wedge{ Q}\ \ q\wedge{ P}). [/tex]

    This determines a point, t, on the intersection. Define the
    unit vector, m, giving the direction and orientation of the
    line of intersection. I shall assume a 3-dimensional space
    here and I assume that the wedge products of p and q with
    their respective planes are not zero. Then the desired
    vector is the dual of the wedge product of the rejection of p by P
    and the rejection of q by Q:

    [tex]n = -i(p\wedge P P^{-1})\wedge (q\wedge Q Q^{-1})[/tex]

    Define m to be the unit vector in the direction of n. The
    equation of the line of intersection is then

    [tex]y \wedge m = t\wedge m[/tex]

    A parametric equation in terms of a scalar parameter is

    [tex]y = d + \gamma m^{-1}[/tex]

    [tex]d = (t\wedge m)\cdot m^{-1}[/tex].

    The expressions here use only p, q, P, Q, and the pseudoscalar.
    Check my algebra; there are bound to be mistakes.
  4. Mar 5, 2008 #3
    Wow that's a lot more complex seeming. I'll have to think about your solution when I'm not at work and can justify the time to do so;)

    I'd guess I assumed the reader would have better mind reading capabilities of the steps I used, so for reference I'll write them out:

    Starting with two planes specified parametrically, each in terms of two direction vectors and a point on the plane:

    x = P + \alpha u + \beta v
    y = Q + a w + b z

    If these intersect then all points on the line must satisify x = y, so the
    solution requires:

    P + \alpha u + \beta v = Q + a w + b z
    (P + \alpha u + \beta v) \wedge w \wedge z = (Q + a w + b z) \wedge w \wedge z = Q \wedge w \wedge z

    Rearranging for [tex]\beta[/tex], and writing [tex]B = w \wedge z[/tex]:

    \frac{Q \wedge B - (P + \alpha u) \wedge B}{v \wedge B}

    Note that when the solution exists the left vs right order of the division by [tex]v \wedge B[/tex] should not matter since the numerator will be proportional to this bivector (or else the [tex]\beta[/tex] would not be a scalar).

    Substitution of [tex]\beta[/tex] back into [tex]x = P + \alpha u + \beta v[/tex] (all points in the first plane) gives you a parametric equation for a line:

    x = P + \frac{(Q-P)\wedge B}{v \wedge B}}v + \alpha\frac{1}{v \wedge B}((v \wedge B) u - (u \wedge B)v)

    Where a point on the line is:

    P + \frac{(Q-P)\wedge B}{v \wedge B}}v =
    \frac{1}{v \wedge B}((v \wedge B)P + ((Q-P)\wedge B)v)

    And a direction vector for the line is:

    \frac{1}{v \wedge B}((v \wedge B) u - (u \wedge B)v)
    Last edited: Mar 5, 2008
  5. Mar 6, 2008 #4
    Thanks! Now I see what you did. I may have a solution but I'm
    not really sure. First, express the two bivectors in terms of
    unit vectors r,m and s, where m points in the
    direction of the line of intersection and r and s are orthogonal
    to m.

    [tex]A = u \wedge v = r \wedge m [/tex]

    [tex]B = w \wedge z = m \wedge s [/tex]

    This takes into account that the four defining directions are
    not linearly independent. Now for u and v,

    [tex]u = u\cdot r r + u\cdot m m[/tex]

    [tex]v = v\cdot r r + v\cdot m m[/tex]

    with similar equations for w and z. Define the scalars

    [tex] \gamma = \alpha u\cdot r + \beta v \cdot r[/tex]

    [tex] \lambda = (\alpha u\cdot m + \beta v\cdot m) [/tex]

    Any point x on the plane A then satisfies

    [tex] x = P + \gamma r + \lambda m [/tex].

    Wedging with B now gives simpler expressions:

    [tex](Q-P)\wedge B = \gamma r\wedge B [/tex]

    [tex] \gamma = (Q-P)\wedge B (r\wedge B)^{-1}[/tex]

    [tex] x = P + (Q-P)\wedge B B^{-1} + \lambda m [/tex]

    [tex] (r \wedge B)^{-1}r = msr^2 = ms = B^{-1}[/tex].

    Now check that the points x so defined lie on the intersection:

    [tex] xB = PB + (Q-P)\wedge B + \lambda mB [/tex]

    [tex] x\cdot B = <xB>_1 = P\cdot B + \lambda m\cdot B[/tex]

    [tex] x\wedge B = <xB>_3 = P\wedge B + (Q-P)\wedge B = Q\wedge B[/tex]

    [tex] xA = PA - (Q-P)\wedge B BA + \lambda mA [/tex]

    [tex] x\cdot A = <xA>_1 = P\cdot A + \lambda m\cdot A\ ***[/tex]

    [tex] x\wedge A = <xA>_3 = P\wedge A \ ***[/tex]

    I am not sure about the equations with the stars. If they are correct,
    then the vector m can be obtained from

    [tex] m = P\cdot B B^{-1} + x\cdot B B^{-1}[/tex]

    [tex] m = P\cdot A A^{-1} + x\cdot A A^{-1}[/tex]

    and noting that the two last terms have opposite signs. Adding:

    [tex] m = -\frac{1}{2}(P\cdot A A + P\cdot B B)[/tex]

    [tex] m\wedge A = m\wedge B = 0[/tex].

    I am not completely satisfied with this but maybe it will give you
    some help.
  6. Mar 6, 2008 #5
    I like the approach, and was inclined to look at it in this way too. I got sidetracked into coming up with expressions for [tex]{\langle AB \rangle}_k[/tex] in terms of symmetric and antisymetric components (like the generalized vector k-vector dot and wedge product formulas which are so handy), and hadn't gotten back to trying this again.)

    At a glance there's something wrong with the final result. Example: P=Q=0, A=e_12, B=e_13

    Line of intersection should be e_1, but your m=0 in that case. The end result for this direction vector m should logically be independent of the points P and Q if the planes do intersect in a line.
  7. Mar 6, 2008 #6
    You are absolutely right. Even if P and Q are not zero, my expression for m
    yields the wrong answer. If I use the expression for n from my first post,
    I do get the correct answer, so at least the method in my first post seems to work in general (but the wedge products must not be zero as I pointed out before.) One can write down a simpler expression for the direction of the line of intersection that doesn't depend on the points on the planes:

    [tex] n = -i(iP)\wedge (iQ) [/tex]

    using the notation from the first post, where P and Q are bivectors.

    So it's back to the drawing board!
    Last edited: Mar 6, 2008
  8. Mar 6, 2008 #7
    I had that result for [tex]\mathbb{R}^3[/tex] too, but in the form

    i{\langle P Q \rangle}_2 = i\frac{P Q - Q P}{2}

    (noting for clarity, since we are switching back and forth, that in this post, and your last, P and Q are the plane bivectors and not points on the planes;)

    This doesn't work for [tex]\mathbb{R}^N[/tex], where the unit pseudoscalar won't map the plane to a normal vector. However, it does seem about as reduced as you can get, and is also in terms of the bivectors only.

    Perhaps in the general case there isn't much choice but to explicitly state the result in terms of direction vectors for at least one of the planes. That's not as good of a solution as the 3d case since for the result to be valid you have to choose v to be _not_ directed along the intersection since [tex]v \wedge B = 0[/tex] in that case.
  9. Mar 6, 2008 #8
    For planes [tex]A=u \wedge v[/tex] and [tex]B=w \wedge z[/tex], a better form for the solution, if it exists, is the following vector:

    (u \wedge B)^2 v + (v \wedge B)^2 u - (u \wedge B)(v \wedge B)u - (v \wedge B)(u \wedge B)v

    This way if one of [tex]u \wedge B=0[/tex], or [tex]v \wedge B=0[/tex], this result will still valid (result will be proportional to one of u or v in those degenerate cases).

    This could alternatively be formulated in terms of w,z, and A. Perhaps that's as good as we can get for the [tex]\mathbb{R}^N[/tex] case.
  10. Mar 7, 2008 #9
    That is true but in the general case one uses the join of the two bivectors instead of the unit pseudoscalar of the whole space. The join here would be

    [tex] r\wedge m \wedge s [/tex]

    where the bivectors are defined A=rm, B=ms. This can be extended to general blades in any dimension, in which case r, m, and s would be blades instead of vectors. I restricted myself to three dimensions because finding the join and the meet (intersection) in higher dimensions is not a trivial problem and requires a well-designed algorithm to get r, m, and s from u, v, w, and z. I myself have no experience in actually doing this and so do not feel competent to instruct others. However, in three dimensions, where one can use the unit pseudoscalar to get m, I think the expression

    x(\lambda) = P + (Q-P)\wedge B B^{-1} + \lambda m

    is a solution satisfying the intuitive feeling of your first post. (The wedge product of the two bivectors is zero because they both contain a common factor, so the above equation ought to work in higher dimensions too if one is prepared to do the necessary work to find the join and meet). I believe that the algorithms start by assuming that the meet is a scalar (i.e. there is no intersection) and then expanding the grade of the meet until the true meet is found; i.e. they are designed to take into account the special cases that you mentioned. Your question has motivated me to learn more about this topic but that will take a bit of time.
  11. Mar 7, 2008 #10
    After a day of boring computer programming work, I thought of the same thing on the drive home.

    Specifically, my thought was that if you reject the component of A from B for two intersecting bivectors:

    Rej_A(B) = \frac{1}{A}{\langle AB \rangle}_2

    the line of intersection remains the same ... that operation rotates B so that the two are mutually perpendicular. This essentially reduces the problem to that of the three dimensional case, so the solution has to be of the same form... you just need to calculate a ``pseudoscalar'' (what you are calling the join), for the subspace spanned by the two bivectors.

    That can be computed by taking any direction vector that is on one plane, that isn't in the second. For example, pick a vector u in the plane A that is not on the intersection of A and B. In mathese that is [tex]u = u\cdot A [/tex] (or [tex]u \wedge A = 0 [/tex]), where [tex]u \wedge B \ne 0[/tex]. Thus a pseudoscalar for this subspace is:

    i = \frac{u \wedge B}{\lvert u \wedge B \rvert} \ne 0

    To calculate the direction vector along the intersection we don't care about the scaling above, so a scaled ``pseudoscalar'' for the subspace can be calculated by taking any vector v that does not lie along the intersection and has a component in both planes:

    i \propto (v \cdot A) \wedge B

    Thus a vector along the intersection is:

    x = ((v \cdot A) \wedge B) {\langle AB \rangle}_2

    (an interchange of A and B above would also work).
  12. Mar 8, 2008 #11
    Yes, I think this would work just fine for two planes, even in an arbitrary number of dimensions.
  13. Mar 8, 2008 #12
    Thanks for the back and forth on this.

    I'm typing up some notes on general bivector and grade-2 geometric algebra for myself. Despite seeming a relatively fundamental topic, it's not really covered well in either my Hestenes nor Doran/Lasenby books (those are both so dense I suppose that's not suprising ... if they covered everything with enough detail that they were easy to read they'd each be two thousand pages long). If you are interested I can mail it or post it when I'm done.
  14. Mar 8, 2008 #13
    Thank you, I would be glad for a copy of your work when it is done. The treatment of
    the meet and the join (intersecting subspaces in general) is covered very well in the
    book " GA for Computer Science" by Dorst, Fortijne and Mann, (Morgan Kaufmann,
    Elsevier, 2007), which I can recommend very highly for all computational aspect of GA and for the treatment of conformal geometry. http://www.geometricalgebra.net/ [Broken]
    Last edited by a moderator: May 3, 2017
  15. Mar 9, 2008 #14
    Well, sounds like I probably would have saved myself some work if I had bought that one ... I've only got the two physics oriented texts mentioned.

    I've attached my notes. I wouldn't call it a work ... more like enough private notes on the subject that I feel I've got a hang of it (goes with a bunch of other similar ad-hoc notes) -- I find that once I write it down so I can look things in nicely formatted Tex generated output I understand what I really know or don't a lot better.

    Attached Files:

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook