CalculateWeight

CalculateWeight[linkage, gvec]
function calculates the the weight vector to links based on the mass property definition. The weight vector is inserted into the $LDForces record of linkage. Weight vector is calculated as m*gVec, where m is the mass of the link and gVec is the gravity vector. Weight vector is acting at the center of mass of the link. The function returns the resulted LinkageData record.
CalculateWeight[linkage]
function calculates the the weight vector to all links assuming that the gravity vector is {0,-9.81,0} .
CalculateWeight[linkage, lName, gvec]
function calculates weight vector for lName link using gvec gravity vector.
CalculateWeight[linkage, {lNames}, gvec]
function calculates weight vector for {lNames} links using gvec gravity vector.
  • Weight is a force that is calculated based on the assigned mass properties of the links. The weight vector is calculated as mass * gravity vector.
In[1]:=
Click for copyable input
Load the predefined double pendulum linkages
In[2]:=
Click for copyable input
Out[2]=
List the $LDMassProperties record of the linkage
In[3]:=
Click for copyable input
Out[3]=
Calculate weight of the linkage
In[4]:=
Click for copyable input
Out[4]=
List the $LDForces record
In[5]:=
Click for copyable input
Out[5]=
Display the linkage with the force vector
In[6]:=
Click for copyable input
Out[6]=