Orientating objects to align with a specific axis

  • Thread starter Thread starter Adder_Noir
  • Start date Start date
  • Tags Tags
    Axis Specific
AI Thread Summary
To orient an object to align with a specific axis in computer graphics, one must calculate the transformation matrix that rotates the object from its current orientation to the desired axis. The process involves determining the unit vector of the target axis and using rotation matrices to achieve the alignment. Understanding the order of rotations (X, Y, Z) is crucial, as it affects the final orientation. Resources like matrix transformation FAQs can provide detailed guidance on the mathematical concepts involved. Properly applying these transformations will enable the object to point in the desired direction accurately.
Adder_Noir
Messages
239
Reaction score
0
Hi!,

I'm well into the world of computer graphics. Love to say it was great but well, it isn't.

I would like to know how I can take any object and have it orientate so its centre aligns perfectly with any arbitrary axis.

Think of a cylinder at the origin pointing down the x-axis. Well I would like to know how I can rotate it so it points directly down an axis denoted by say (1,1,0) essentially in this theoretical case rotating it 45 degress. I haven't got a clue how to do this and I'm a bit thick too at times.

I know it has something to do with inverse matrices and such. I can get all the required inverse, determinant stuff from DirectX hard-coded functions so I don't even need to do much math I just need the solution method.

Any ideas? Naturally I can get a unit vector pointing down the required axis easily enough but how do I go about acquiring the necessary transform matrix to get something to go from its present position to be aligned with a new axis? Sure I know it's a concoction of X,Y, & Z rotations but hell which order to apply them in even if I did have the necessary rotations? I'm proper confused!

Thanks a lot for any help offered :wink:
 
Mathematics news on Phys.org
Hi this resource:

http://web.archive.org/web/20041029003853/http:/www.j3d.org/matrix_faq/matrfaq_latest.html"

Question 39 I believe firmly answers the question ;o)
 
Last edited by a moderator:
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Back
Top