Skip to main content

Luca Chiodini

Create high-quality images and GIFs with Asymptote

Have you have ever wanted to create a GIF like this one1? These kinds of images and representations are often useful, for example, to convey an idea to the public during a presentation. In fact, I embedded this animation in a slide used to present a paper that was about stencil computations. This tutorial will guide you step-by-step to end up with that nice GIF. Along the way, you will learn basic “building blocks” you can reuse to create many different things.

What the global statement really means in Python

Teaser Consider this Python program: foo = 42 def f(): global foo print(foo) # prints 42 f() What does global mean? What does it do? Maybe you could be under the impression that the global statement (i.e., the line of code that starts with the keyword global) is necessary to make the variable foo “visible” inside the function f and therefore for this program to work properly. If that is what you think or you are not sure whether this claim is correct or not, then I encourage you to continue reading to learn some of Python’s Execution Model.