   Dot product between 3D and 4D vector
  Does it make any sense ?I am trying to Calculate texture coordinates for vertices after parsing a .map fileand the article : http://folk.uio.no/stefanha/MAPFiles.pdf suggests thatin the formula you use to calculate the U and V texture coordinates, one operation is to take the dot product of the vertex with the texture axis.However , the vertex is a 3D vector while the texture axis is described as a 4D vector:O   
  There's no such thing as the dot product of a vector in R^3 and a vector in R^4. I don't know how you are trying to apply the texture to the object (what type of projection?). I haven't read the whole article, but the section where he gives the formula doesn't explain this either, so it's hard to help.   ;  Presumably, one coordinate of the texture axis is actually doing something other than describing a location. If you can figure out which one it is (it'll probably be the last one) then you can just dot with the other three coordinates.   ;  Okay ,  ill check it for detailsthanks alot , rate++   ;  There can be such a thing as a dot product between a vector from a n-dimensional vectorial space and a vector from an (n+1)-dimensional vectorial space, since every vector belongs to an infinite number of vectorial spaces of varying dimensions (for instance, a non-zero vector x in the plane also is a vector on the line xR, which has one less dimension than the plane).Because of this, there is also an infinite number of ways in which it would make sense to perform that operation. And none of them are conventional. However, in your case, there are two possibilities:1. The 4D vector is, in fact, not a linear vector but a projective vector. In that case, the 3D vector is in fact also a 4D vector (which has a fourth coordinate equal to 1).2. One of the coordinates of the 4D vector is orthogonal to the 3D vector, which means that coordinate should simply be ignored, and the 4D vector should be considered as a 3D vector without that coordinate.   ;Quote:1. The 4D vector is, in fact, not a linear vector but a projective vector. In that case, the 3D vector is in fact also a 4D vector (which has a fourth coordinate equal to 1).I don't think that case makes much sense, since the result of the operation is not well defined. The 4 coordinates of a projective vector are just one representative of a class of proportional 4D vectors. Well-defined operations don't depend on which representative of the class is used. So I don't think there will be situations where your possibility number 1 will apply. The possibility 2 makes more sense.;  The 4D vector is a plane. The dot product between a plane and a 3D point works just like a 4D-4D dot product in which the 3D point is extended to 4D by assigning its fourth component the value 1.   ;  What the vectors represent and how you convert them to be inter-operable depends on the context.  In this case you don't really have a 4D vector, but a 3D vector with a texture shift value.  This is important, because if you tried to convert the 3D vector into a 4D vector using a standard homogeneous interpretation (add a W value of 1) and performed the dot product you'd get an incorrect result.Having worked with MAP files for a long time, the correct way to do this is to take the dot product between the two 3D vectors, and subtract the texture shift.   ;Quote:Original post by ToohrVykThere can be such a thing as a dot product between a vector from a n-dimensional vectorial space and a vector from an (n+1)-dimensional vectorial spaceThat is correct. Such things formally defined in the geometric algebra, which intorduce concept of multivector. Multvector is sum of object of different dimentions like vectors, scalars, bivectors (geometric product of two vectors A*B = A.B + A^B) (A^B is analog of cross product)etc. The Geomtric algebra is alternative to linear algebra for 3d graphics, and allow more natural operations with solid objects.link to pdf with very good and easy explanationhttp://www3.telus.net/j_suter/paper/geometric_algebra.pdfwiki article (not good)http://en.wikipedia.org/wiki/Geometric_algebra   ;  IMHO, from a pure mathematical point of view, the dot-product could be computed only if both vectors have the same dimensionality:a . b := a^T * bHowever, in the given case it seems me to be just a question of mapping from the 3D affine space to the 4D homogeneous space. Often the homogeneous co-ordinate is dropped, since it is 0 (for direction vectors) or else 1 (for _normalized_ position vectors) and hence could be determined from the context. So here are in fact 2 4D vectors given, I think.I agree also that a n-dimensional vector could be given in a "projected space", and hence could be unprojected back into a higher dimensional space, but that seems me no proove that a dot-product could be done between vectors of different dimensionality. Instead, both vectors are transformed to be in the same space before building the dot-product, and hence have the same dimensionality.EDIT: Hmm. Multivectors? Never heard about that. Must have a look on it soon...   