TITLE: Best program for creating educational math animations?
QUESTION [23 upvotes]: I'm looking for recommendations on what program to use for creating mathematical animations. These animations will be used in creating educational videos for high school math -- Trigonometry first, but others will come later. I am particularly focusing on teaching the material from a conceptual basis, and to that end, I want to create high-quality animations that can help students understand the ideas they're working with.
What program would be particularly well suited for making math animations aimed at teaching high school level material? I'm willing to learn a scripting/programming language (or at least enough of one) if that's the best choice. Upfront time investment is okay: I'll likely be making quite a few of these animations over the next few years. 
Requirements

Plotting (2d): Needs to be able to plot single-variable functions and then animate through manipulation of one or more parameters.
Export Animations: It must be possible to export the animation to some form of movie file format or animated GIF.

Not Required, but Nice

Graphics Primitives: The program should have various primitives (line segments, circles, etc.) that are also capable of animation. This can be worked around by doing enough plotting, but it's much more elegant to have access to primitives.
Runs on Mac: I do most of my work on my Mac laptop, so that's the preferred OS.
Free (preferably open-source): Not much budget at the moment. Additionally, I plan to open-source all of the materials I use in creating the videos, so that's less useful if the work is done on a paid program.

Here's my current list of possibilities.
Free Options

GeoGebra
GIFsmos (Takes Desmos animations as inputs and spits out GIFs)

Paid Options

Mathematica
MATLAB
Maple

Non-Math-Focused Option

Adobe Flash (Can't [I think?] handle plotting, but might be best choice for working with simple graphics.)

If you think one of the above candidates is a great choice, please let me know why you think so in your answer. If you think that there's another option better than the above, please tell me about it.
Summary: What is the best program for making math animations, knowing that the intent is to use them in videos teaching high school math?

REPLY [4 votes]: There's this open-source tool that's gotten pretty popular recently. It's called Manim - the math animation engine, originally developed by Grant Sanderson (who is the man behind the popular math YouTube channel 3b1b) while he was an undergrad.
His videos feature extremely pleasing animations which served as an ultimate motivation for me to study  quantum mechanics. He made his tool open-source and from then the manim engine has gained huge popularity among many math YouTubers. The fact that it's Python-based makes it even more appealing and easy-to-use.
Though the official documentation is a little lagging behind (I feel) there are many forks on GitHub, some of which have better documentation like this one and this one. There are fairly good number of tutorials that teach animation in manim. It's evident that there's a growing community adopting this fairly new tool.