Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

http://imgur.com/itkKA

I'm looking for this behavior to simulate the movement of the recoil of a gun.

I'm not sure the recoil exactly has this shape, that's a wild guess.

I'm looking for a function that does this approximately, or simulate the movement caused by recoil...

Something like f(t)=...

Any idea ?

Somebody told me about some probabilistic function of Maxwell something, but I can't use it without a time dependent formula.

share|improve this question
    
Which kind of simulation? Different applications require different degrees of accuracy -- "I'm designing a gun stand" is not the same as "I'm animating a ship firing a broadside and want it to look somewhat realistic". –  Henning Makholm Mar 13 '12 at 20:28
    
making a game, using 32 bit precision, which is not much but quite enough. Has to be fast. –  jokoon Mar 13 '12 at 22:05

1 Answer 1

up vote 1 down vote accepted

Looks somewhat like a rescaled version of $y = x e^{-x}$. Try $y=cx e^{1-cx}$ with various choices of $c>1$. For example, try entering (5x)e^(1-5x) from 0 to 1 into Wolfram Alpha.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.