comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: 3D vector rotation to the Z axis
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: 3D vector rotation to the Z axis [message #73998 is a reply to message #73975] Mon, 13 December 2010 19:23 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Dec 14, 1:11 am, MartyL <mlandsf...@yahoo.com> wrote:
> I would like to rotate and arbitrary 3D vector to be aligned with the
> Z axis. I can translate and scale the vector but I can not find a
> formula to create the rotation matrix to perform the rotation. It
> sounds simple but I can't seem to find one.
> Thanks

Do you mean something like

IDL> t3d,identity(4),matrix=matrix,rotate=[45d0,0d0,0d0]
IDL> print,matrix
1.0000000 0.0000000 0.0000000 0.0000000
0.0000000 0.70710678 -0.70710678 0.0000000
0.0000000 0.70710678 0.70710678 0.0000000
0.0000000 0.0000000 0.0000000 1.0000000
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Random NetCDF I/O error
Next Topic: Associating GeoTiFF tags with basic Mercator projection parameters?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:14:30 PDT 2025

Total time taken to generate the page: 0.00390 seconds