Long before the Force.com Tooling API came out I tried to buid a native tool in Salesforce to render UML class diagrams for Apex classes and SObjects.
The extraction of the class and object information is solely done in Apex. I really had to use very ugly RegExp parsing of classes to get out relationships, fields and object.
This definitly runs into limits or errors if you classes are too complex. So regard this as a proof of concept and...
Feel free to check (fork and collaborate) it on GitHub: