If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Pixar in a Box>Unit 4

Lesson 1: Hair simulation 101

# Spring-mass system

Springs make hair bouncy in animations! Hooke's Law explains spring force: it's proportional to stiffness (k) and displacement (change in length). Positive displacement stretches springs (pull force), while negative displacement compresses them (push force). Mass spring systems create realistic hair movement in movies like Brave.

## Want to join the conversation?

• What about the friction of the hair strands is there a mathemathical formula or written code for that to look into ?
• Hi Nahsor,
This is a great question! My guess is that this would be more complicated than necessary. When doing these sorts of activities you are looking for some level of "good enough" when approximating natural phenomenon, and generally only in specific circumstances. One example that comes to mind is wind. If you spend several hours outside you will note that there is generally some wind throughout that time and that it varies; however, wind is rarely used in animation unless for a specific activity or event (e.g., a storm, flying, etc.).
Onward!
• Hold up isn't Robert Hooke the guy that helped make cell theory?
• that is right is the same cientist, he create the cell theory and a couple more theories !!
• but if the magnitude is greater what happens to the spring stiffness or does it affect the gravity
• why does it not let me watch the video
• How much do you software engineers earn?
• How do you use math to make a single strand of hair of Merida ?
• they use the math to set the program, so doing this the program (wich understand better in numbers and codes) can create millions of hair in a faster way just like us in the interactive program, that is based on the same math !!
(1 vote)
• What would happen if you attached two springs together and let them bounce?
(1 vote)
• Nothing particularly special. The weight of the bottom spring would pull on the top spring, causing it to stretch. Then, when the top spring flicks back into place, it will pull the bottom one along. When the top spring is at its most contracted, and can't contract any further, it will expand due to gravity, but not before sending a small shockwave to the bottom spring. (This is because as it snaps back into place, it generates a small amount of force. As every action has an equal and opposite reaction, it'll send that shock down toward the bottom spring.) This will cause a slight offset. Over time, both of the springs will lose momentum and go into resting position. More information can be found in the lesson about stiffness & damping on KhanAcademy, here: https://www.khanacademy.org/partner-content/pixar/simulation/hair-simulation-101/v/sim3-launch