Mechanics package contains several classes implementing implementing an interactive damper, a set of interactive dampers, an interactive spring and a set of interactive springs.
Name | Description |
---|---|
![]() | Draws a damper |
![]() | Draws a set of dampers |
![]() | Draws a spring |
![]() | Draws a set of springs |
Creates a damper. The posistion of the two damper extremities (p1[:] and p2[:] variables) can be linked to the model variables.
Type | Name | Default | Description |
---|---|---|---|
Real | d | 1/3 | Length of the damper fixed part divided by the damper length |
Real | L1 | 0.02 | Distance from the wide to the narrow part of the damper |
Real | L2 | 0.02 | Width of the narrow part of the damper |
Integer | intX1Y1 | 0 | = 0 if the point (x1, y1) change in time and 0 otherwise |
Integer | intX2Y2 | 0 | = 0 if the point (x2, y2) change in time and 0 otherwise |
Color | color1[4] | {255,0,255,255} | The damper color changes form this color to color2 |
Color | color2[4] | {249,204,202,255} | The damper color changes form this color to color1 |
Type | Name | Description |
---|---|---|
Parent | pLeft | Connector of drawable components |
Child | cLeft | Connector of drawable components |
model Damper "Draws a damper" extends src.ViewElements.Drawables.Mechanics.Damper; end Damper;
Creates a set of dampers. The posistion of the two extremities of each damper (p1[:, :] and p2[:, :] variables) can be linked to the model variables.
Type | Name | Default | Description |
---|---|---|---|
Integer | N_dampers | 2 | Number of dampers |
Real | d | 1/3 | length of the damper fixed part divided by the damper length |
Real | L1 | 0.02 | distance from the wide to the narrow part of the damper |
Real | L2 | 0.02 | width of the narrow part of the damper |
Integer | intX1Y1 | 0 | = 0 if the point (x1, y1) change in time and 0 otherwise |
Integer | intX2Y2 | 0 | = 0 if the point (x2, y2) change in time and 0 otherwise |
Color | color1[4] | {255,0,255,255} | The damper color changes form this color to color2 |
Color | color2[4] | {249,204,202,255} | The damper color changes form this color to color1 |
Type | Name | Description |
---|---|---|
Parent | parent | Connector of the drawable elements |
Child | child | Connector of the drawable elements |
model DamperSet "Draws a set of dampers" extends src.ViewElements.Drawables.Mechanics.DamperSet; end DamperSet;
Creates a spring. The posistion of the two spring extremities (p1[:] and p2[:] variables) can be linked to the model variables.
Type | Name | Default | Description |
---|---|---|---|
Real | d | 1/19 | length of the spring without picks divided by the damper length and two |
Integer | N | 4 | pick number |
Real | A | 0.05 | amplitude of the picks |
Integer | intX1Y1 | 0 | = 0 if the point (x1, y1) change in time and 0 otherwise |
Integer | intX2Y2 | 0 | = 0 if the point (x2, y2) change in time and 0 otherwise |
Real | stroke | 2 | Stroke used to draw the lines |
Color | lineColor[4] | {192,192,192,255} | Line Color |
Type | Name | Description |
---|---|---|
Parent | pLeft | Connector of drawable components |
Child | cLeft | Connector of drawable components |
model Spring "Draws a spring" extends src.ViewElements.Drawables.Mechanics.Spring; end Spring;
Creates a set of dampers. The posistion of the two extremities of each spring (p1[:, :] and p2[:, :] variables) can be linked to the model variables.
Type | Name | Default | Description |
---|---|---|---|
Integer | N_springs | 2 | Number of springs |
Real | d | 1/19 | length of the spring without picks divided by the damper length and two |
Integer | N | 4 | pick number |
Real | A | 0.05 | amplitude of the picks |
Integer | intX1Y1 | 0 | = 0 if the point (x1, y1) change in time and 0 otherwise |
Integer | intX2Y2 | 0 | = 0 if the point (x2, y2) change in time and 0 otherwise |
Real | stroke | 2 | Stroke used to draw the lines |
Color | lineColor[4] | {192,192,192,255} | Line Color |
Type | Name | Description |
---|---|---|
Parent | parent | Connector of the drawable elements |
Child | child | Connector of the drawable elements |
model SpringSet "Draws a set of springs" extends src.ViewElements.Drawables.Mechanics.SpringSet; end SpringSet;