From GPWiki
This article is part of a series:
This wiki page is under construction!
This page may be incomplete, missing information, or inaccurate!
Explanation
A spring is a connection between two objects that will use impulses to put it back to the correct position instead of constraining it.
Description
Hooke's Law
Hooke's Law states that the the force to move two objects together with a spring is proportional to the distance apart, or
-
: Force vector to restore the objects to the correct position
- k: Spring constant, a number describing how fast the objects will move to get to the correct position
-
: A vector equal to the difference in position of the two bodies' positions
Hooke's Law with Damping
Using the plain version of Hooke's Law will cause the spring to oscillate forever. However, a modified version with damping causes the objects eventually stop.
-
: Force vector to restore the objects to the correct position
- k: Spring constant, a number describing how fast the objects will move to get to the correct position
-
: A vector equal to the difference in position of the two bodies' positions
-
: A vector equal to the difference in velocity of the two bodies
- b: Damping constant, a number describing how quickly the objects will slow to a stop. Negative values will cause the objects to accelerate
Alternate Spring Equations
There are more possible equations than Hooke's Law. A rather useful one keeps the bodies a certain distance apart.
Length Spring
This type of spring will keep the two objects a certain distance apart.
-
: Force vector to restore the objects to the correct position
- k: Spring constant, a number describing how fast the objects will move to get to the correct position
-
: A vector equal to the difference in position of the two bodies' positions
-
: The magnitude of
- d: The distance to keep the bodies apart (the desired length of the spring)
-
: A vector equal to the difference in velocity of the two bodies
- b: Damping constant, a number describing how quickly the objects will slow to a stop. Negative values will cause the objects to accelerate
|
|