Question: I want the ability to animate a scene where I can draw boxes, circles, text, and other things like images, and be able to record it. I figure I will need my own recording software, but that is separate from this post.

Because my needs are very simple, the tool I use should be free.

Since some of the things will be computer science and math related, originally I was looking at 3Blue1Brown's videos, but the application used for those videos is a bit overkill for what I need.

Answer: 
Expanding on Alejandro's comment you could try [p5js](https://p5js.org/get-started/).

> 
> p5.js is a JavaScript library for creative coding, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else!
> 
> 
> 

[Here is an implementation of snake](https://editor.p5js.org/p5/sketches/Interaction:_snake) in their online editor. (Use i,j,k,l to control the snake).

[The Coding Train](https://www.youtube.com/watch?v=HerCR8bw_GE&list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA) on YouTube has lots of video tutorials on p5js (and processing, what p5js is based on (I think!))
The Unity web player still works, though it's no longer supported and requires the user to install it.

Supernova flash player is an option for legacy swf files.

Everything else is going to be HTML5, probably backed up with a canvas element. You can use plain javascript or one of the very many js libraries designed for this sort of thing. The first 3 I can think of which aren't already in another answer are phaser, melon and createjs.