MAMBO logo MAMBO & the MAMBO Toolbox MAMBO logo

SetTime —Declaration of a time variable [mathematica]

SetTime[t]

t: a name representing the MAMBO time variable

The function SetTime declares the MAmbo time variable for later use. Indeed, the DiffTime, LinearVelocity, AngularVelocity, LinearMomentum, and AngularMomentum procedures assume that the time variable has been declared this way. Any expressions with explicit time-dependence require the use of this command.

Restart;
DeclareObservers[A,B,C];
DeclarePoints[A,B,C];
DeclareTriads[a,b,c];
DefineObservers[{A,A,a},{B,B,b},{C,C,c}];
DefinePoints[{A,B,a,Cos[s],p1,p2},{B,C,c,r-s,0,1}];
DefineTriads[{a,b,theta,1},{a,c,{s-Pi/2,1},{Pi/2,2}}];
DefineNeighbors[{A,B},{B,C}]
SetTime[wrist];
MotionOutput["states"->{theta->0},"parameters"->{s->1,p1->1,p2->2}, 
  "anims"->{r->s^2*p1-Cos[p2*wrist]},"checksings","checkargs"];
states theta=0;
parameters s=1,p1=1,p2=2;
time wrist;
anims {
   r=-cos(p2*wrist)+p1*(s*s);
}

Restart;
DeclareStates[q1];
DiffTime[q1*Sin[t]]

Sin [ t ] q1

SetTime[t];
DiffTime[q1*Sin[t]]

q1 Cos [ t ] + Sin [ t ] q1


Toolbox functions