Original Post
hi! a, b are vectors, s is a scalar. if a * s = b then b/a = s. Is vector-division possible? Or, how can I get s from a and b, what if a contains zero(s)? bye, Chris
Quote:
Original post by Zoomby
what if a contains zero(s)
Quote:
Original post by Zoomby
thanks! Why I asked it:
I want to check if a point is on a line.
the equation is c = a + x * b, where c is the point and (a + x * b) is the line. So how can I find x?
x = c - a / b would not make sense because of the division?
if ( (n) == a *(m)+ b ) return true;else return false;Quote:
Original post by Zoomby
hi!
a, b are vectors, s is a scalar.
if a * s = b then b/a = s.
Is vector-division possible? Or, how can I get s from a and b, what if a contains zero(s)?
bye,
Chris
Quote:
Original post by Zoomby
I want to check if a point is on a line.
Quote:
the equation is c = a + x * b, where c is the point and (a + x * b) is the line. So how can I find x?
Quote:
Original post by Zoomby
thanks! Why I asked it:
I want to check if a point is on a line.
the equation is c = a + x * b, where c is the point and (a + x * b) is the line. So how can I find x?
x = c - a / b would not make sense because of the division?
[c1] [a1] [x1][c2] = [a2] + [x2]b[c3] [a3] [x3]Then you can solve it like this:[(c1-a1)/b] [x1][(c2-a2)/b]= [x2][(c3-a3)/b] [x3]If, however, b is also a vector, say like this:[c11 c12 c13] [a11 a12 a13] [x11 x12 x13][b11 b12 b13][c21 c22 c23] = [a21 a22 a23] + [x21 x22 x23][b21 b22 b23][c31 c32 c33] [a31 a32 a33] [x31 x32 x33][b31 b32 b33]Then you need to do this:(C-A)B^-1 = XQuote:
Original post by Zoomby
is it true that is doesn't matter with which vector I do the dot product, since u and b are linearly dependent? So the vector (1 1 1) could be used?
Quote:
Original post by Zoomby
is it true that is doesn't matter with which vector I do the dot product, since u and b are linearly dependent? So the vector (1 1 1) could be used?
Quote:
Original post by ury
Sorry haegarr, missed your post.
Quote:
Original post by haegarr
Do I miss something? Please correct me if I'm wrong, but:
Neither are u (P-R0 in my somewhat detailed post above) and b (t) linearly dependent in general, nor could an arbitrary vector be used.
Quote:
Original post by ury
If the vectors are colinear, that is P = R(s), then any vector would do (as long as you don't divide by zero). This has only a theoretical value though since in practice using the vector b is the best choice.
BTW, if I am not mistaken, the vectors are colinear in OP's question.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more