kinetic energy

Started by
75 comments, last by Eelco 18 years, 10 months ago
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 )
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
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 =)
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.
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
hmm ...how do i transpose a vector then? =)
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.
TotalKE = .5f*(linMomentum.dot(linVel) + rotMomentum.dot(rotVel));
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
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.

This topic is closed to new replies.

Advertisement