An intriguing challenge with physics

Blitz3D Forums/Blitz3D Programming/An intriguing challenge with physics

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

SetBuffer BackBuffer() 

mx# = MouseX() 
my# = MouseY() 

px# = mx + 100 
py# = my  

l# = 40.0 
f# = 2.0

Repeat

	Cls
 
	lmx# = mx# 
	lmy# = my# 

	mx# = MouseX()  
	my# = MouseY()  

	smx# = mx-px+((mx-lmx)*f)
	smy# = my-py+((my-lmy)*f)

	d# = Sqr(smx*smx + smy*smy)  

	px# = mx - ((smx/d)*l) 
	py# = my - ((smy/d)*l) 

	Line mx,my,px,py 
	Flip 

Until KeyHit(1)
Divine Mk. I! :)

Adjust f# to set how fast it turns!