2
$\begingroup$

This answer on StackOverflow answers a question about intersection of two segments. Right at the beginning, it introduces a “vector cross product”.

Define the 2-dimensional vector cross product $\vec v \times \vec w$ to be $v_x w_y − v_y w_x$.

However, this doesn't seem to be a regular cross product (nor does it even produce a vector). I realize that the formula is a simple determinant of the two vectors, but I cannot understand its meaning or relation to the rest of the post.

Does it have a meaning (motivation) or is it just a “lucky-guess” operation in order to transform the equation $\vec p + t\vec r = \vec q + u \vec s$ into a solvable state? In other words, how does this operation (intuitively) relate to the described algorithm?

$\endgroup$
2
$\begingroup$

Geometrically it gives the (signed) area of the parallelogram defined by the two vectors.

If you multiply by the appropriate unit normal to the plane you get the normal three dimensional cross product. You don't get a vector in the plane though.

If you try to define a "cross product" in four dimensions, you might appreciate that the familiar situation in three dimensions is a happy coincidence which trips up people who try to generalise in the wrong way.

$\endgroup$
  • $\begingroup$ Isn't that true for the regular cross product definition? This one is different. $\endgroup$ – Lazar Ljubenović Mar 30 at 9:19
  • $\begingroup$ Ah, apparently it holds for both. Sorry. +1 $\endgroup$ – Lazar Ljubenović Mar 30 at 9:32
0
$\begingroup$

Apparently, this is known as perp product; however, the only online reference I could find after a (rather quick) search is this geomalgorithms page. It's also on Wolfram, where it mentions that Hill introduced it in 1994, in a chapter in “Graphic Gems IV”.

He firstly defines perp operator (perpendicular operator) which gives a rotation of a vector by 90 degeres:

$$ \vec v^\perp = (v_x, v_y)^\perp = (-v_y, v_x). $$

Then a perp product (perpendicular product) is defined, denoted as an infix operator $\perp$:

$$ \vec v \perp \vec w := \vec v ^ \perp \cdot \vec w = v_x w_y - v_y w_x. $$

The idea of using the perp product in the algorithm seems to come from the following property: $$\vec v \perp \vec w = 0 \Leftrightarrow \text{$\vec v$ and $\vec w$ are collinear}. $$

At the end of the algorithm, the denominators are $\vec r \perp \vec s$, which is then discussed for being zero, implying collinearity of the vectors and parallelity of the segments.


Either way, a similar but much more intuitive discussion of the problem with the same idea of using parametric equations and perp product is given at this page called “Intersections of Lines and Planes” on geomalgorithms. It also gives more details in the algorithm at the bottom, considering cases where one or both segments are degenerated into a single point.

$\endgroup$
  • 1
    $\begingroup$ Note that that page describes the perp product as also being called the exterior product. Using the latter term you will be able to find more resources about exterior algebra (the algebraic system whose product is the exterior product) and perhaps more interestingly, geometric algebra, whose geometric product combines the inner/dot product (·) and the exterior/wedge product () as complementary measures indicating how parallel or perpendicular, respectively, the two vectors are to each other. $\endgroup$ – waldyrious Apr 7 at 16:20
  • $\begingroup$ In particular, you might appreciate how the wedge product produces an assumedly higher-dimensional construct (a bivector, which is a oriented planar segment the same way a vector is a directed line segment), whereas the cross product produces what looks like a vector but is just a more compact encoding of the same information (note how a cross product's sign implicitly represents the orientation of one vector in relation to the other). A wedge product not only represents this information explicitly, but is also generalizable to other dimensions, while the cross product only exists in 3D. $\endgroup$ – waldyrious Apr 7 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.