#### Archived

This topic is now archived and is closed to further replies.

# 3dVector to matrix

This topic is 5511 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i want to convert a 3dvector say velocity into a matrix, to transform geometry.

##### Share on other sites
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]

##### Share on other sites
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.

##### Share on other sites
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]

##### Share on other sites
i solved problem

take vector''s length and normalize it.
convert it into quaternion
convert quat. into matrix

1. 1
2. 2
3. 3
Rutin
14
4. 4
5. 5

• 9
• 9
• 11
• 11
• 23
• ### Forum Statistics

• Total Topics
633674
• Total Posts
3013277
×