Parallel axis theorem, cube (Confirm)

Click For Summary
SUMMARY

The discussion centers on the application of the Parallel Axis Theorem to calculate the inertia tensor of a cube. Jon initially miscalculated the inertia by assuming equal mass for two boxes of different sizes. After correcting his approach by ensuring consistent density and recalculating mass, he successfully derived the inertia tensor for a smaller box offset along the x-axis. The final formula used was Idisp = Icenter + mass[(R·R)I - R×R], confirming the correct application of the theorem.

PREREQUISITES
  • Understanding of the Parallel Axis Theorem
  • Familiarity with inertia tensor calculations
  • Knowledge of matrix operations in physics
  • Basic programming skills in a language that supports matrix operations
NEXT STEPS
  • Study the derivation of the Parallel Axis Theorem in detail
  • Explore matrix operations and their applications in physics simulations
  • Learn about density and mass calculations in rigid body dynamics
  • Investigate the implementation of inertia tensor calculations in game physics engines
USEFUL FOR

Physics students, game developers, and engineers working on simulations involving rigid body dynamics and inertia calculations.

BoiledPotato
Messages
2
Reaction score
0
Parallel axis theorem, cube! (Confirm)

// Idisp = Icenter + mass[ (RdotR)*I - RcrossR ]

So to test it out, I create a long box at the origin, and then a smaller
box, half its width, so I can offset it along the x axis, and times it by
2, so it should equal the inertia tensor of the long box.

Is this correct?... why would it be wrong?

Thanx,

Jon

// ref: http://en.wikipedia.org/wiki/Parallel_axis_theorem

// Understanding?
float mass = 1.0f;
Matrix inertiabBox = BoxMatrix(mass/*mass*/, 3/*width*/, 10/*height*/, 50/*depth*/);
Matrix inertiaLongBox = BoxMatrix(mass/*mass*/, 6/*width*/, 10/*height*/, 50/*depth*/);

Vector3 R = new Vector3(3.0f,0,0); // Offset it by R
Matrix mA = inertiabBox + mass*( Vector3.Dot(R,R)*Matrix.Identity - OuterProduct(R,R) );

Matrix inertiaSameAsLongBox = 2 * mA; ? but why?


/* REF */
Matrix BoxMatrix(float mass, float w, float h, float d)
{
float ss = (1/12.0f) * mass;
Matrix bb = Matrix( ss*(h*h+d*d), 0, 0, 0,
0, ss*(w*w+d*d), 0, 0,
0, 0, ss*(w*w+h*h), 0,
0, 0, 0, 1 );
return bb;
}

Matrix OuterProduct( Vector3 a, Vector3 b)
{
return Matrix( a.X*b.X, a.X*b.Y, a.X*b.Z, 0.0f,
a.Y*b.X, a.Y*b.Y, a.Y*b.Z, 0.0f,
a.Z*b.X, a.Z*b.Y, a.Z*b.Z, 0.0f,
0, 0, 0, 1.0f );
}
 
Physics news on Phys.org
Problem sorted, my mistake, in my calculations I was making the assumption that mass was the same for both the smaller and larger box...should have been setting the density the same and recalculating the mass.

float mass0 = 0.5f;
float mass1 = 1.0f;
Matrix inertiabBox = BoxMatrix(mass0 /*mass*/, 3/*width*/, 10/*height*/, 50/*depth*/);
Matrix inertiaLongBox = BoxMatrix(mass1 /*mass*/, 6/*width*/, 10/*height*/, 50/*depth*/);

Vector3 R = new Vector3(1.5f,0,0); // Offset it by R
Matrix mA = inertiabBox + mass0*( Vector3.Dot(R,R)*Matrix.Identity - OuterProduct(R,R) );

Matrix inertiaSameAsLongBox = 2 * mA;

Thanx

Jon
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
Replies
31
Views
3K
  • · Replies 15 ·
Replies
15
Views
6K
  • · Replies 5 ·
Replies
5
Views
5K