webgl-fundamentals icon indicating copy to clipboard operation
webgl-fundamentals copied to clipboard

Clarify cross product a bit

Open paulmasson opened this issue 5 years ago • 3 comments

paulmasson avatar May 05 '19 23:05 paulmasson

@greggman curious as to why this PR wasn’t merged with my other two

paulmasson avatar May 10 '19 19:05 paulmasson

Sorry, I was still thinking about it (and I'm on vacation)

I appreciate the idea. I'm not 100% sure I like the change. It doesn't really add anything since the text already says the result is a perpendicular vector. It also removes the nuance that you don't need to understand why it does that in order to use it.

It's also not clear that is what the actual meaning of "cross product" is. You can take the cross product of a other dimensional vectors. I don't think those cases give you a perpendicular vector. Certainly not in 2D. In any case it doesn't seem to correct to say the meaning of cross product produces a perpendicular vector given it doesn't always and I think the real meaning of "cross product" means something else. To put it another way, "cross" means something otherwise they should have named it the "perpendicular product".

https://math.stackexchange.com/questions/62318/origin-of-the-dot-and-cross-product

In any case part of the point of the articles is to try not to get too "mathy" as IMO it scares away lots of devs who are not strong with math (like me) so hence the fact that I don't really get the deep understanding of "cross product" like the person answering that math.stackexchange question I can never the less use it effectively to solve graphics problems.

greggman avatar May 11 '19 06:05 greggman

Strictly speaking one cannot take cross products in other dimensions. It's not defined in two dimensions, and in four or more the generalization is a wedge product. The details of a wedge product is three dimensions is presented nicely in this Wikipedia section. The resulting object is not a vector, but is constructed from oriented surface areas. The cross product is really an idea restricted to three dimensions.

Historically the cross product was introduced to simplify the equations of electromagnetism. Undergraduate physics students all learn the right-hand rule to figure out, among other things, the direction in which current flows in a wire. It's a directly visceral way to understand the result of taking the cross product: you rotate your fingers from the direction of the first vector to the second, and your thumb gives the direction perpendicular to their common plane. That's what I was trying to capture in one sentence.

paulmasson avatar May 12 '19 00:05 paulmasson