paroj / gltut

Learning Modern 3D Graphics Programming
https://paroj.github.io/gltut/
MIT License
1.57k stars 377 forks source link

Definition of Vector multiplication is vague #133

Open pavel-zhigulin opened 3 years ago

pavel-zhigulin commented 3 years ago

Here is your definition of Vector multiplication (equation 3, here )

Vector Multiplication.  Vector multiplication is one of the few vector operations that has no real geometric equivalent. To multiply a direction by another, or multiplying a position by another position, does not really make sense. That does not mean that the numerical equivalent is not useful, though.

Multiplying two vectors numerically is simply component-wise multiplication, much like vector addition.

What you described is actually called Hadamard product

Basically when "Vector multiplication" is said it is implied to be Cross product , which is completely different thing.

paroj commented 3 years ago

Basically when "Vector multiplication" is said it is implied to be Cross product , which is completely different thing.

why not dot product?

pavel-zhigulin commented 3 years ago

why not dot product?

Because dot product produces scalar and, usually, is used in different context. I wouldn't even notice this if you wouldn't claim that the book is for begginers. Okay, "Vector multiplication" is quite fine, but I would prefer to see some kind of note, like:

Multiplying two vectors can have different definitions in math, depends on context we use it. In computer graphics we usually will be interested in so called "Hadamard product", which is simply component-wise multiplication, much like vector addition.

\<formula>

In chapter 9 we'll cross with other definition, which is called "dot Product", which could be helpful in context of calculation angles between vectors, but we'll discuss it later.

(I'm not a native speaker so stylistically my example could be not good enough, I just hope you got the idea).