org.vizzini.math
Class MomentOfInertiaCalculator

java.lang.Object
  extended by org.vizzini.math.MomentOfInertiaCalculator

public class MomentOfInertiaCalculator
extends Object

Provides a calculator of moment of inertia values for three-dimensional physical objects. Formulas taken from Wikipedia.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Method Summary
 double[] computeForBoxSolid(double mass, double width, double height, double depth)
          Return the moment of inertia for a solid box of the given dimensions and mass.
 double[] computeForCylinderSolid(double mass, double radius, double height)
          Return the moment of inertia for a solid cylinder of the given radius, height and mass.
 double[] computeForCylinderThickWalled(double mass, double radius0, double radius1, double height)
          Return the moment of inertia for a thick walled cylinder of the given radius, height and mass.
 double[] computeForCylinderThinWalled(double mass, double radius)
          Return the moment of inertia for a thin walled cylinder of the given radius and mass.
 double[] computeForSphereHollow(double mass, double radius)
          Return the moment of inertia for a hollow sphere of the given radius and mass.
 double[] computeForSphereSolid(double mass, double radius)
          Return the moment of inertia for a solid sphere of the given radius and mass.
static MomentOfInertiaCalculator getInstance()
          Return the singleton instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MomentOfInertiaCalculator getInstance()
Return the singleton instance.

Since:
v0.3

computeForBoxSolid

public double[] computeForBoxSolid(double mass,
                                   double width,
                                   double height,
                                   double depth)
Return the moment of inertia for a solid box of the given dimensions and mass.

Parameters:
mass - Mass.
width - Width.
height - Height.
depth - Depth.
Since:
v0.3

computeForCylinderSolid

public double[] computeForCylinderSolid(double mass,
                                        double radius,
                                        double height)
Return the moment of inertia for a solid cylinder of the given radius, height and mass.

Parameters:
mass - Mass.
radius - Radius.
height - Height.
Since:
v0.3

computeForCylinderThickWalled

public double[] computeForCylinderThickWalled(double mass,
                                              double radius0,
                                              double radius1,
                                              double height)
Return the moment of inertia for a thick walled cylinder of the given radius, height and mass.

Parameters:
mass - Mass.
radius0 - Inner radius.
radius1 - Outer radius.
height - Height.
Since:
v0.3

computeForCylinderThinWalled

public double[] computeForCylinderThinWalled(double mass,
                                             double radius)
Return the moment of inertia for a thin walled cylinder of the given radius and mass.

Parameters:
mass - Mass.
radius - Radius.
Since:
v0.3

computeForSphereHollow

public double[] computeForSphereHollow(double mass,
                                       double radius)
Return the moment of inertia for a hollow sphere of the given radius and mass.

Parameters:
mass - Mass.
radius - Radius.
Since:
v0.3

computeForSphereSolid

public double[] computeForSphereSolid(double mass,
                                      double radius)
Return the moment of inertia for a solid sphere of the given radius and mass.

Parameters:
mass - Mass.
radius - Radius.
Since:
v0.3


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02