Jump to content
  • Advertisement
Sign in to follow this  
glSmurf

kinetic energy

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to know the total kinetic enery of a rigid body in 3D. Now I know how to compute the energy of the translation float Ek = mass * dot(velocity) * 0.5; but realy have no idea what to do with the formula for the rotation energy Ek = I * rotvel² * 0.5 In 2D this would be simple as 'I' only is a single float, but in 3D it's a 3x3 matrix. I would realy appreciate if someone shared some code with me ( and everyone else in this forum )

Share this post


Link to post
Share on other sites
Advertisement
You are probably talking about the moment of inertia
there is a link : http://www.gamedev.net/community/forums/topic.asp?topic_id=322238

Share this post


Link to post
Share on other sites
Quote:
Original post by maxime959
You are probably talking about the moment of inertia


nope ...I'm talking about kinetic energy
Here's a link to what Im talking about for those of you who don't know what it is
http://mechatronics.technion.ac.il/rotordynamics/html/kinetic.htm

'I' in the formula is the moment of inertia.

Quote:
Original post by maxime959
there is a link : http://www.gamedev.net/community/forums/topic.asp?topic_id=322238


I started that thread =)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You have to remember that in 3D, the angular velocity ("rotvel") is described by a 3D vector (as opposed to a scalar in 2D). The norm of the vector represents the velocity of rotation while its direction represents the axis of rotation. Given this, the kinetic energy is given by

K_rot = 1/2 * w_trans * I * w

where w_trans is the transposed w vector.

Hope it helps.

Share this post


Link to post
Share on other sites
Mh, I should go to sleep :)

I suggest maybe ( from your link ) : Ek = 0.5 * w.transpose() * I * w;
with w a vector and I the moment of inertia

Share this post


Link to post
Share on other sites
Quote:
hmm ...how do i transpose a vector then? =)
All that means is that if the convention is to use column vectors, treat the vector as a row vector, and vice versa. In the example given:

K_rot = 1/2 * w_trans * I * w

The convention is column vectors, and so in a matrix-vector multiplication the matrix goes on the left. If you want to multiply a vector by a matrix on the right, you transpose the vector so that it becomes a row vector. In practice you can implement this as a special mult function for the matrix class, or have two '*' functions, one that takes a vector on the left and a matrix on the right, and one that is the other way around.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by jyk
Quote:
hmm ...how do i transpose a vector then? =)
All that means is that if the convention is to use column vectors, treat the vector as a row vector, and vice versa. In the example given:

K_rot = 1/2 * w_trans * I * w

The convention is column vectors, and so in a matrix-vector multiplication the matrix goes on the left. If you want to multiply a vector by a matrix on the right, you transpose the vector so that it becomes a row vector. In practice you can implement this as a special mult function for the matrix class, or have two '*' functions, one that takes a vector on the left and a matrix on the right, and one that is the other way around.


Actually it does not matter wether it is row or collume mayor since I is symetics

Share this post


Link to post
Share on other sites
Quote:
Actually it does not matter wether it is row or collume mayor since I is symetics
Technically you can only multiply a row vector to the left of a matrix and a column vector to the right, so it does matter in that sense. Also, I'm not sure if this is what you mean, but unless I'm mistaken the inertia matrix is not necessarily symmetrical.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!