Here's another neat example I whipped up: http://tinyurl.com/y92b9o3 (URL shortener used since the actual link is 761 characters long, containing the entire texture source). It renders a Sierpinski triangle by doing x & y != 0, then mirrors it to the bottom-right corner (so as to cover the entire texture). It's a good example of the simple sort of math you can play around with, then immediately apply to a demo. Converting that to C to make it work in my demo consists of nothing more than replacing 'var' with 'int', which makes my life easy.