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!))
All the answers that were posted there ignore that we have OpenGL-like API ([WebGL](https://www.khronos.org/webgl/)), 2D graphics ([canvas](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D) and SVG) and transpilers (something→JS) for many programming languages, and even binary executables ([wasm](https://webassembly.org/)). You can use these technologies to develop games for web browsers and all of these are standard technologies and well-supported by current browsers.

You can develop the game in pure JS with drawing onto canvas with the ordinary 2D commands (for rather simple graphics). If you want 3D or just more complex graphics, you can use WebGL.

When you do not want to use JS, but something more portable (Scheme, …) or compilable to machine code (C, C++, [Rust](https://www.rust-lang.org/what/wasm), … – see also Emscripten project), you can choose some transpiler or compiler that produces either WebAssembly (bytecode supported by the most common browsers) or asm.js (assembly-like form of JavaScript, supported everywhere where the JS is).

So, the solution is simple: Modern web standards are enough for such purposes.