I have written generic Point classes, line/line intersection algorithms and Layer administration code more times than I can remember. I don't like menial programming, so this is effectively my code library. But you can use it too!
The language used is Processing, which is a mostly-Java-syntax language. I hardly ever use Java-specific ninja code, so rewriting any of these snippets to your favourite language is less than a minute's worth of work, typically.
How is this different from other code snippet websites? From what I can tell, on this site you'll actually get what you're looking for without having to jump through hoops because the UX is dominated by ads, and a hundred forum-style links to code that has absolutely nothing to do with what you're looking at. I also document my code to an insane degree, so if you don't understand what a snippet does from just the code and comments, that's not because you suck, but because I suck. If a snippet doesn't explain itself, it's pretty useless (because how will you be able to verify that it does what I claim when I don't explain myself properly?).
Want to contribute? Submit a snippet. After making sure it's fully documented =)
- Mike "Pomax" Kamermans
Written and maintained by Mike "Pomax" Kamermans. All code snippets on this site are "do whatever you want with it" licensed.