FuncMorph Save

Crazy figures and animations with Haskell

Project README

FuncMorph

You can create fancy looking things and linearly interpolate between them to make animations and gifs.. like you're directing a movie (not that I know what it's like XD)
And, because this is haskell, everything is a one-liner!

Work in progress! Contributions are welcome!

Dependencies

Examples

draw $ map (squiggly 3 10) (stdn 100)

1.gif

draw $ map (squiggly 15 3) (stdn 200)

2.gif

diagram $ draw $ map (squiggly 60 2) (stdn 300)

3.gif

draw $ map (squiggly 60 10) (stdn 300)

4.gif

shot3 = map (\x -> (rad*cos(2*pi*x), rad*sin(2*pi*x))) std -- circle
shot4 = rotatePts (pi / 4) shot3 -- rotate
shot5 = lerpPts 0.35 shot4 $ rotatePts (pi / 4) $ map squarify shot3 -- squircle
shot6 = map (squiggly 15 3) std
shot7 = rotatePts (-pi / 4) $ lerpPts 1.5 shot3 $ map squarify shot3 -- diamond
play [(shot3,2), (shot4,2), (shot5,2), (shot5,2), (shot6,2), (shot7,2)]

anim.gif

Docs

Check out the accompanying notebook

Like what you see?

Pythonistas can check out a similar work in Python

Open Source Agenda is not affiliated with "FuncMorph" Project. README Source: sam46/FuncMorph
Stars
33
Open Issues
2
Last Commit
5 years ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating