View Full Version : Operations

08-22-2001, 03:44 AM
hey guys!

what does it mean this B - A
B and A are both vectors[0..2]

ohhh in delphi...

is like
B[0] - A[0]
B[1] - A[1]
B[2] - A[2], or is another operation, like crossproduct ?

08-22-2001, 05:16 AM
It means subtract vector A from vector B.

I think in your case the aim is to give the vector from A to B.


08-22-2001, 07:20 AM
In standard math notions,

A * B is the dot product(the asterisk should be a dot in the middle)

A x B is the cross product.

08-22-2001, 08:01 AM
Could you put the equations of the dot and cross products ???

Rob The Bloke
08-22-2001, 03:50 PM
dot: you'll probably use this one

A * B = A[0]*B[0] + A[1]*B[1] + A[2]*B[2]

to find:

A * B = |A|*|B|*cos(angleBetweenThem)


C[0] = A[1]*B[2] - A[2]*B[1]
C[1] = A[2]*B[0] - A[0]*B[2]
C[2] = A[0]*B[1] - A[1]*B[0]
A x B = C

This gives the vector normal to A & B. Its length is equal to the area of the polygon defined by them...