Hi Greg,
I don't think anyone has implemented an instance for static transformations of dynamic geometry. Ought to be easy, though. Also dynamic transformation of static geometry and dynamic transformation of dynamic geometry. And the corresponding three additional instances for 2D geometry. All six would be very useful.
So I don't forget, would you please submit a ticket to either http://trac.haskell.org/reactive or http://trac.haskell.org/FieldTrip ?
You might also enjoy adding these instances yourself. Patches are very welcome.
Thanks, - ConalOn Mon, Nov 24, 2008 at 10:27 AM, Greg Fitzgerald <gar...@gmail.com> wrote:
Should it be possible to write this:
spinningTorusPair :: Double -> Behavior Geometry3
spinningTorusPair sz = uscale3 sz *% spinningG torusPair
Instead of this:
spinningTorusPair :: Double -> Behavior Geometry3
spinningTorusPair sz = (uscale3 sz *%) <$> spinningG torusPair
That is, should a Behavior of something transformable be an instance
of Transform as well? Has anyone tried to implement this instance?
Thanks,
Greg
_______________________________________________
Reactive mailing list
Reac...@haskell.org
http://www.haskell.org/mailman/listinfo/reactive
Implementing just the dynamic transformation of dynamic geometry seems
to work out best.
instance Transform xf a => Transform (Behavior xf) (Behavior a) where
(*%) = liftA2 (*%)
With the other instances, GHC complains about ambiguities, and it's
easy enough to pull either side up into the dynamic realm.
Thanks,
Greg
_______________________________________________
FieldTrip mailing list
Fiel...@haskell.org
http://www.haskell.org/mailman/listinfo/fieldtrip
Cool, I updated my Bounce example to reactive-fieldtrip-0.0.4. It now
bounces pairs of spinning torus pairs on left mouse clicks. Comments
welcome.
-Greg