[reactive] Status of Reactive "feedback" (recursive integral, etc)
bugfact at gmail.com
Tue Dec 2 17:35:39 EST 2008
This has been brought up before, but I'm not sure about the current status
our consensus regarding "recursive feedback" in Reactive.
In Yampa this is solved by the ArrowLoop instance, and by having two
different integral functions: one with a delay and without a delay.
If I understood it correctly, it Conal's aim to provide just a single
integral function that can handle both the recursive and regular cases?
But, is this even possible?
A nice example of this is David's "boingee" example: a ball on the screen
gets dragged towards the current mouse position.
Mathematically, this is
vb(t) = s * ( pm(t) - pb(t) )
pb(t) = pb0 + integral [0..t] vb(t)
pb(t) is the position of the ball at time t
pb0 is the initial position of the ball at time t=0,
pm(t) is the position of the mouse at time t
s is some arbitrary scale factor
Of course this is not really realistic but it is a simple example of
recursive feedback: pb(t) depends on vb(t) and vice versa.
Can we make such behaviors with Reactive?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Reactive