(clickable link:) I wrote this sierpinski triangle generator a while ago, and just remembered I was going to share it here. It includes the source code (in Processing.js) so you can see exactly how it works! codekincodeprocessingcode example