How to create arbitrary shapes?

I have checked Shape, some of the classes that implements Shape, General path, PathIterator, Area. But I still don’t know how far java can reach in drawing shapes.

May I create vector diagram? May I define a shape using mathematical functions? Something like that. It would be best if there is a game totally drawn by code rather than importing images.