# Drawing and animation, package recommendation

**URL:** <https://discourse.julialang.org/t/drawing-and-animation-package-recommendation/63917>\
**Category:** Visualization\
**Tags:** animations\
**Created:** [July 1, 2021, 8:33pm UTC](https://discourse.julialang.org/t/drawing-and-animation-package-recommendation/63917 "2021-07-01T20:33:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erasmo98](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erasmo98/32/26098_2.png) [@Erasmo98](https://discourse.julialang.org/u/Erasmo98)\
**Post date:** [July 1, 2021, 8:33pm UTC](https://discourse.julialang.org/t/drawing-and-animation-package-recommendation/63917/1 "2021-07-01T20:33:54Z")

</div>

A friend of mine made this awsome image by hand using Windows Paint. Which package do you recommend me for drawing it and animating it? The animation would be of transformations of the original image. I’ve read that Cairo, Luxor, Javis, Animations, Compose and Gadfly could be used for drwaing or animating. There are many packages and I don’t where to begin. I would like use only package for doing both things.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/d/3dea3c1ada7b4c5b516fb1784c5939787b9db0aa.jpeg)

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [July 1, 2021, 10:09pm UTC](https://discourse.julialang.org/t/drawing-and-animation-package-recommendation/63917/2 "2021-07-01T22:09:43Z")

</div>

It partly depends on what you mean by “transformations”. 🙂

The job would be fairly straightforward in Cairo.jl, although you’d have to write some utility functions to generate the animations.

It would be easy to do in Luxor.jl and probably even easier in Javis.jl (which I think uses Animations.jl internally).

I don’t understand Compose.jl at all, but I think their approach to constructing graphics might be useful for some of these shapes, not sure. (“As everyone from lisp hackers and phylogeneticists knows, trees can be defined most tersely using S-expressions.”)

I don’t know whether Compose.jl or Gadfly.jl do animations, but I assume they could be persuaded to do so.

If you decide to go with Luxor.jl I can probably help you with problems if you open issues on [GitHub - JuliaGraphics/Luxor.jl: Simple drawings using vector graphics; Cairo "for tourists!"](https://github.com/JuliaGraphics/Luxor.jl).

---

<div class="post-metadata">

**Author:** ![Erasmo98](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erasmo98/32/26098_2.png) [@Erasmo98](https://discourse.julialang.org/u/Erasmo98)\
**Post date:** [July 2, 2021, 2:52am UTC](https://discourse.julialang.org/t/drawing-and-animation-package-recommendation/63917/3 "2021-07-02T02:52:23Z")

</div>

> [@cormullion](#):
>
> It partly depends on what you mean by “transformations”. 🙂

I mean transformation in a geometeic sense like rotations.

> [@cormullion](#):
>
> If you decide to go with Luxor.jl I can probably help you with problems if you open issues on [GitHub - JuliaGraphics/Luxor.jl: Simple drawings using vector graphics; Cairo “for tourists!”](https://github.com/JuliaGraphics/Luxor.jl).

Thank you, I’ll give Luxor a try and post an issue if I run into trouble. 🙂

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [July 2, 2021, 6:53am UTC](https://discourse.julialang.org/t/drawing-and-animation-package-recommendation/63917/4 "2021-07-02T06:53:40Z")

</div>

The basic graphic is quite easy:

 ![pent](https://global.discourse-cdn.com/julialang/original/3X/e/6/e665d95869cc989e1a67bb9afa2eef7f5f8ef135.png)

The “magic number” that works here is:

```julia
𝔾 = 1/(MathConstants.golden ^ 2) # (about 0.38)

```

which will scale one pentagon down to the next smaller one.

Have fun!

---

<div class="post-metadata">

**Author:** ![Erasmo98](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erasmo98/32/26098_2.png) [@Erasmo98](https://discourse.julialang.org/u/Erasmo98)\
**Post date:** [July 2, 2021, 7:20am UTC](https://discourse.julialang.org/t/drawing-and-animation-package-recommendation/63917/5 "2021-07-02T07:20:42Z")

</div>

It’s great! You won me the pentagon so I guess I’ll have to make it with another polygon. q:

---

<div class="post-metadata">

**Author:** ![KajWiik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kajwiik/32/199_2.png) [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Post date:** [July 2, 2021, 9:30am UTC](https://discourse.julialang.org/t/drawing-and-animation-package-recommendation/63917/6 "2021-07-02T09:30:49Z")

</div>

Thanks for the pointer to [Javis.jl](https://wikunia.github.io/Javis.jl/stable/)!
