use of artisynth.core.mechmodels.MechModel in project artisynth_core by artisynth.
the class ArticulatedDemo method build.
public void build(String[] args) {
MechModel mechMod = new MechModel("mechMod");
mechMod.setGravity(0, 0, -9.8);
mechMod.setFrameDamping(1.0);
mechMod.setRotaryDamping(4.0);
// mechMod.setIntegrator (MechSystemSolver.Integrator.BackwardEuler);
// create9LinkLoop (mechMod);
// create3LinkPlaneCollider (mechMod);
// createLadderPlaneCollider (mechMod);
// createCollidingLinkage (mechMod);
// createLongLinkage (mechMod, 6);
usePlanarContacts = true;
createLongLinkage(mechMod, new Point3d(-5, 2, 10), new Point3d(15, 2, 5), 20, 0.5, 10);
createLongLinkage(mechMod, new Point3d(5, -2, 10), new Point3d(-15, -2, 5), 20, 0.5, 10);
mechMod.setBounds(new Point3d(0, 0, -10), new Point3d(0, 0, 10));
mechMod.setProfiling(true);
addModel(mechMod);
addControlPanel(mechMod);
}
use of artisynth.core.mechmodels.MechModel in project artisynth_core by artisynth.
the class QuadraticLockingDemo method build.
public void build(String[] args) {
myTetMod = new FemModel3d("tet");
FemFactory.createTetGrid(myTetMod, WIDTH, WIDTH, LENGTH, NX, NY, NZ);
myTetMod.transformGeometry(new RigidTransform3d(-3 * WIDTH / 4, 0, 0));
setModelProperties(myTetMod);
myQuadtetMod = new FemModel3d("quadtet");
FemFactory.createQuadtetGrid(myQuadtetMod, WIDTH, WIDTH, LENGTH, NX, NY, NZ);
setModelProperties(myQuadtetMod);
myQuadtetMod.transformGeometry(new RigidTransform3d(3 * WIDTH / 4, 0, 0));
myHexMod = new FemModel3d("hex");
FemFactory.createHexGrid(myHexMod, WIDTH, WIDTH, LENGTH, NX, NY, NZ);
setModelProperties(myHexMod);
myHexMod.transformGeometry(new RigidTransform3d(9 * WIDTH / 4, 0, 0));
myMechMod = new MechModel("mech");
myMechMod.addModel(myTetMod);
myMechMod.addModel(myQuadtetMod);
myMechMod.addModel(myHexMod);
addModel(myMechMod);
addControlPanel();
}
use of artisynth.core.mechmodels.MechModel in project artisynth_core by artisynth.
the class SimpleCollide method attach.
public void attach(DriverInterface driver) {
super.attach(driver);
MechModel mechMod = (MechModel) models().get(0);
// mechMod.rigidBodies().get(0).setDynamic(false);
// NumericInputProbe inprobe =
// new NumericInputProbe(
// mechMod, "rigidBodies/0:position", 0, 5);
// inprobe.addData (2.5, new Point3d(0,0,0.8));
// addInputProbe (inprobe);
}
use of artisynth.core.mechmodels.MechModel in project artisynth_core by artisynth.
the class DoubleArmDemo method build.
public void build(String[] args) {
model = new MechModel("Arm");
addModel(model);
model.setIntegrator(MechSystemSolver.Integrator.RungeKutta4);
model.setMaxStepSize(0.01);
setupRenderProps();
addRigidBodies();
addJoint();
addMuscles();
addEndPoint();
addPanel();
}
Aggregations