Quicker drop-off speed

BlitzMax Forums/BlitzMax Programming/Quicker drop-off speed

EOF(Posted 2006) [#1]
I need a bit of scary maths stuff here. Have a look at this image:

What I want to do is decrease the speed quicker the lower it gets.
Currently, what I have is a gradual drop-off speed as shown by the RED in the image. Code example:
' speed drop-off

Const sw=640,sh=480

Graphics sw,sh,0
SetColor $fc,$30,$20

Local speed#=460.0
Local x%

Repeat
	speed:/1.009
	x:+1
	DrawLine x,sh-speed,x,sh
Until speed<1

Flip
WaitKey
End
What I want to achieve is something like the BLUE indicates. That is, the slower the speed is, the quicker the decelleration. Think of a snooker ball and how its slows down quicker because of the friction of the felt.
My example feels too linear. Any ideas?


Chris C(Posted 2006) [#2]
speed=speed-(((maxspeed+1)-speed)/100.0)

but the drop off is quite high and severe...


Robert Cummings(Posted 2006) [#3]
Cubic falloff or something?


Chris C(Posted 2006) [#4]
this is a bit more useful



EOF(Posted 2006) [#5]
Thats helped Chris. Ta very much.


Chris C(Posted 2006) [#6]
no worries mate!