Ok, i have two points in space, i get the vector direction (l,m,n) i want to draw a little arrow , but i don''t want to rotate a orthogonal vector using a quaternion , i would like to
simply draw an arrow in 3d given two points, i have tried a lot of geometric formulas, axis of a segment and so on , but it didn''t come as i want , anyone knows / has code to do it ?
thanks in advance
OK, I didnt doublecheck this, but the clue is the "first we make a normal vector:" -section, the rest is fairly straight out. Oh and if you use float or double values, they rarely become zero, but if (z1-z2) should happen to be zero, then find the normal setting z3 = 1, y3 = 1, and x3 = (-(y1-y2)-(z1-z2))/(x1-x2), that should work work aswell, and if (x1-x2) also is zero, just base it on y the same way. Well, as I said, I didnt double check this, but I know it works, there might be simpler ways also, be sure to tell me if I made some stupid mistakes hehe