use of artisynth.core.inverse.TargetPoint in project artisynth_core by artisynth.
the class FemSurfaceTargetDemo method addTrackingController.
public void addTrackingController() {
TrackingController tcon = new TrackingController(mech, "tcon");
for (FemNode n : fem.getNodes()) {
if (n.getPosition().x < -l / 2 + eps) {
tcon.addMotionTarget(n);
RenderProps.setAlpha(n, 0.5);
}
}
for (MuscleBundle b : fem.getMuscleBundles()) {
tcon.addExciter(b);
}
// project reference points to body
addController(new SurfaceTargetController(body.getMesh(), tcon.getMotionSources(), tcon.getTargetPoints()));
for (TargetPoint p : tcon.getTargetPoints()) {
RenderProps.setPointRadius(p, l / 100);
}
tcon.addL2RegularizationTerm(0.1);
tcon.setProbeDuration(10);
tcon.createProbesAndPanel(this);
addController(tcon);
}
Aggregations