#### Archived

This topic is now archived and is closed to further replies.

# Spring Dampening

This topic is 5731 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I set up a wave simulation using something I saw on here once. Basically the vertical acceleration of a vertex in a height field is proportional to the weighted average height of vertices near it. So basically the acceleration is -kx where x is the displacement from the average height. The k affects how fast the wave propogates as well as the vertical acceleration of the vertex. I use a convolution matrix (filter) to calculate the weighted average height. I''ve found the size of that filter determines the wave length. The filter I use gives a weight equal to the inverse square of the distance from the center. That makes the center division by zero so I assign an arbitrary values there. The value I use in the center has some impact on the dampening. I can also dampen it by setting the total of all the elements of the filter to less than one. It seems there should be a way to dampen a single vertex without regard to any other vertex. It also seems like the dampen factor should be of the form C1-C2*e^(-kx^2) where TV is a terminal velocity. I can''t figure out how to actually work that in. Any suggestions on how to actually work that in or alternatives on dampening a vertex? Also is there any way to increase the wave length without increasing the size of the filter?

##### Share on other sites
Does this sound reasonable? If dv is the change in velocity calculated for the frame based on displacement, v is the velocity at the start of the frame and tv is a terminal velocity then ndv=dv*(tv-|v|)/tv where net change in velocity. When the velocity is zero the multiplier is one and when the velocity is the +/- the terminal velocity the multiplier is zero.

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 23
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631766
• Total Posts
3002235
×