I recently* discovered a programming language called Processing, designed mainly for graphical demos. Programs written in this language are known as "sketches", and can be exported as applications or Web pages. Here are some of the sketches I've made.
Here's the description of Processing from their home page:
Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology. There are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning and prototyping.
Note: All sketches open in a new window. A mouse icon () indicates a sketch that is interactive. A icon indicates a sketch that requires WebGL.