Undertanding moment of inertia about a line through origo

Please don't post Bullet support questions here, use the above forums instead.
lilo
Posts: 16
Joined: Tue Nov 17, 2009 11:30 am

Undertanding moment of inertia about a line through origo

Post by lilo »

I am refresshing some basic physics needed to write my physics engine and have come to a problem. I really dislike to continue reading when thre are stuff that I can not understand. The fomula is from David H eberly's game physics book p.59.

The problem is the the formula for moment of inertia about a line passing origo in 3D

The line is: O + tD. where O is origo and D a unit length direction vector for the line. We want to have the distance from a point r_i to the line which can be written as david suggests:

I = sum_{i = 1} to p {m_i(length(r_i)^2 - (dot(D, r_i))^2)}

where dot(D, r_i) should give the scalar projection on D (the length) and length(r_i) should give the length of vector r_i if I have thought correct. So the difference will just give a difference in squared length of the r_i vector and scalar projection on D (dot(D,r_i))? Am I correct?

Isn't it more correct to write:

I = sum_{i = 1} to p { m_i( length( r_i - D*dot(D, r_i) )) }, where D*dot(D, r_i) is calar projection vector on O + tD.

This formula takes the distance of the difference of r_i and scalar projection vector on D.

Hope you can bear with the math writing (is there a way to format in math language?) and my lack of understanding.

Thx!