Code Monkey home page Code Monkey logo

muscularmodel's Introduction

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

muscularmodel's People

Contributors

gubena avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.