13CREATING 2D AND 3D ANIMATIONS
A picture that changes over time can be a good way to visualize many situations. The Haskell Prelude itself does not have any support for animation, but some good library packages are available at https://hackage.haskell.org. For two-dimensional pictures and animations, we’ll use the gloss package. For three-dimensional pictures and animations, we’ll use a package named not-gloss.
2D Animation
The gloss package supplies the Graphics.Gloss module, which provides four main functions: display, animate, simulate, and play. The first is for still pictures, the second and third are for pictures that change with time, ...
Get Learn Physics with Functional Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.