Processing math: 100%
Ask Your Question
0

finding rotation matrix in 3d

asked 12 years ago

ebs gravatar image

updated 12 years ago

suppose I have a normalized vector perpendicular to a plane like

x=(2i+3j+k)14 , how can I find a rotation matrix A, such that it rotates x into the xy plane like so:

Ax=y=(i,j)2

Preview: (hide)

Comments

This is a linear algebra question, not a question about Sage. Try asking on http://math.stackexchange.com/

benjaminfjones gravatar imagebenjaminfjones ( 12 years ago )

Look at http://www.hr.shuttle.de:9000/home/pub/105/ There is an example.

ndomes gravatar imagendomes ( 12 years ago )

why did you rotate the vector around z axis? can't we rotate it around x and y axes instead?

ebs gravatar imageebs ( 12 years ago )

Your original question doesn't have a unique answer. There are infinitely many rotations that take your vector `x` to a vector in the XY-plane.

benjaminfjones gravatar imagebenjaminfjones ( 12 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 8 years ago

Sébastien gravatar image

According to documentation matrix.ith_to_zero_rotation return a rotation matrix that sends the i-th coordinates of the vector v to zero by doing a rotation with the (i-1)-th coordinate :

sage: v = vector((2,3,1))/sqrt(14)
sage: matrix.ith_to_zero_rotation(v, 2)
[                       1                        0                        0]
[                       0  3/10*sqrt(14)*sqrt(5/7)  1/10*sqrt(14)*sqrt(5/7)]
[                       0 -1/10*sqrt(14)*sqrt(5/7)  3/10*sqrt(14)*sqrt(5/7)]
sage: matrix.ith_to_zero_rotation(v, 2) * v
(1/7*sqrt(14), sqrt(5/7), 0)

See also matrix.vector_on_axis_rotation.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 12 years ago

Seen: 1,347 times

Last updated: Mar 02 '17