2d spring variables

an immoveable (but draggable) anchor point has a spring and bob hanging below and swinging in two dimensions. regard the bob as a point mass. define the following variables:

*θ*= angle (0 = vertical, increases counter-clockwise)*s*= spring stretch (displacement from rest length)*l*= length of spring*u*= position of bob*v*=*u*'= velocity of bob*a*=*u*''= acceleration of bob

*r*= rest length of spring*t*= position of anchor point*m*= mass of bob*k*= spring constant*b*= damping constant*g*= gravitational constant

note that for this simulation the vertical dimension increases downwards.
we'll need the standard unit vectors **i**, **j**. we use bold and overline to indicate a vector.

**i**= unit vector in horizontal direction**j**= unit vector in vertical (down) direction

there are three vector forces acting on the bob:
*m* **a** = **f**_{gravity} + **f**_{spring} + **f**_{damping}
*m* (*a*_{x} **i** + *a*_{y} **j**) = *m* *g* **j** −
*k* *s* (sin *θ* **i** + cos *θ* **j**) −
*b* (*v*_{x} **i** + *v*_{y} **j**)
we can write the horizontal and vertical components of the above as separate equations. this gives us two simultaneous equations. we also divide each side by *m*.

these are the equations of motion. it only remains to show how *s* sin *θ* and *s* cos *θ* are functions of the position of the bob. the displacement of the spring *s* is the current length of the spring minus the rest length.

from the pythagorean theorem we can get the length of the spring *l* in terms of from the position of the bob, *u*, and the position of the anchor point, *t*.

the sine and cosine of the angle *θ* are:

**f**_{gravity}=*m**g***j**= gravity acting straight down**f**_{spring}= −*k**s*(sin*θ***i**+ cos*θ***j**) = the spring pulling (or pushing) along the line from bob to anchor point.**f**_{damping}= −*b*(*v*_{x}**i**+*v*_{y}**j**) = damping (friction) acting opposite to the direction of motion of the bob, ie. opposite to its velocity vector.

a = − _{x}^{k}⁄_{m} s sin θ − ^{b}⁄_{m} v
_{x} | (1a) |

a = _{y}g − ^{k}⁄_{m} s cos θ − ^{b}⁄_{m} v
_{y} | (1b) |

s = l − r
| (2) |

(3) |

sin θ = (u − _{x}t)/_{x}l
| (4a) |

cos θ = (u − _{y}t)/_{y}l
| (4b) |

� erik neumann, 2004 | home | top | next |

michael kors outletjordan 6 black infraredmichael kors outletjordan retro 6coach outlet onlineblack infrared 6sbeats by dre cheaplegend blue 11scoach factory outletsac louis vuittonjordan 11 legend bluejordan 11 legend bluejordan retro 6Legend Blue 11slebron 12lebron 11 Biscaynecoach outlet onlineblack infrared 6smichael kors outletlegend blue 11s