You can use imageMagick to create pictures from scratch. As it's a parameters configuration, and the exemple you gave are frameworks based.
But I prefer create pictures with SVG, it has animation, interaction..., this kind of programmation is more permisive and portable 😂.
PS : to complete the author's message : Manim