3dVector to matrix

Started by
3 comments, last by DirectXXX 20 years, 5 months ago
i want to convert a 3dvector say velocity into a matrix, to transform geometry.
3D Side-Scroller game demo Project-X2 "playable"Lashkar: A 3D Game & Simulation Project demo @ lashkar.berlios.de
Advertisement
You don''t turn a vector into a matrix. You use a transformation matrix to multiply by and return another 3dVector. You can concatanate several object space transformations into one matrix, thus optimizing the number of operations. Here is the translation transformation in object space (sometimes called local transformation space):
v = [x, y, z, 1]
M =
[1, 0, 0, 0]
[0, 1, 0, 0]
[0, 0, 1, 0]
[dx,dy,dz,1]
v * M = v'' = [x + dx, y + dy, z + dz, 1]
If it is possible to converted euler angles into a rotation matrix why i cant convert a vector into a matrix.

I was reading an article which was discussing to convert 3d velocity(airplane velocity) into a rotation matrix. So you can use it to transform Airplane geometry.

Also i heared about quaternion to do the job.
3D Side-Scroller game demo Project-X2 "playable"Lashkar: A 3D Game & Simulation Project demo @ lashkar.berlios.de
You cant convert a vector into a matrix because a vector is a matrix.

[x y z] is a vector and a 1 row - 3 column matrix.

Thats all a vector is, a 1 row or 1 column matrix.





[edited by - Jingo on November 9, 2003 2:03:31 PM]
i solved problem

take vector''s length and normalize it.
convert it into quaternion
convert quat. into matrix
3D Side-Scroller game demo Project-X2 "playable"Lashkar: A 3D Game & Simulation Project demo @ lashkar.berlios.de

This topic is closed to new replies.

Advertisement