Skip to content

The MuscularModel class is an abstract class that uses the classes (Muscle, Bone, Weight, Nail, Hinge and Glue) to manage a muscular and skeletal model simulation with the help of the library PBox2D by Daniel Shiffman.

License

Notifications You must be signed in to change notification settings

gubena/MuscularModel

Repository files navigation

MuscularModel

The MuscularModel class is an abstract class that uses the classes (Muscle, Bone, Weight, Nail, Hinge and Glue) to manage a muscular and skeletal model simulation with the help of the library PBox2D by Daniel Shiffman.

This code uses objects of the library PBox2D to simulate the bones, weights and joints of a model, but to simulate the muscle a specific object has been coded that uses Hill's muscular model to obtain the force produced by a specific muscle with the activation set. This means that the muscles in this simulation act like real muscles so the simulation can be used to mimic real joint movement and muscle forces.

To use this code and make a muscular model simulation the user has to create a concrete class that extends MuscularModel. Then the user has to define the abstarct functions:

  • abstract void defineMain()
  • abstract void defineBones(float x, float y, int variantIndex)
  • abstract void defineJoints(float x, float y, int variantIndex)
  • abstract void defineMuscles(float x, float y, int variantIndex)
  • abstract void defineWeights(float x, float y, int variantIndex, int weightIndex)

An example of how to define the functions is found in the class SampleModel that creates a simple muscular model:

And this is a model of an arm that can be found in the repository MuscularDemo that is a demostration of this class

About

The MuscularModel class is an abstract class that uses the classes (Muscle, Bone, Weight, Nail, Hinge and Glue) to manage a muscular and skeletal model simulation with the help of the library PBox2D by Daniel Shiffman.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published