Did you try scripting a vector graphics program? You might be able to do something like that from an Illustrator script.
I've never tried scripting Illustrator but scripting Blender is one of the things that got me thinking about this ... (That and the fact that I have an idea for an application that would require this functionality)
See, I've never been able to really get over the learning curve of using Blender's UI but I can get around that fact because my needs from Blender are pretty meager. I use Blender to render backgrounds for puzzle games that I write which are usually pretty simple in terms of models: boxes, frames, shadowbox type things, like geometric still-lifes. Since I don't know how to use Blender's UI I do everything using the Python interface. If I need a model of a picture frame on a wall, I write a Python script that has a function that generates the wall and a function that generates the picture frame, etc. I started thinking about how those functions are like representations of the objects and what it would be like if there was a programming environment that allowed you to interact with geometry represented this way. Blender itself and its programming environment is something like this but not really because most operations generate output and consume their input; meaning from Blender's python interface you can't do reflection on an arbitrary object and see "Oh, this thing was made by a extruding a rectangle and unioning it with a sphere" or whatever, but if you look at a function in a script that does that you can, etc.
Anyway, now I'm rambling...
Edited by jwezorek, 24 August 2012 - 01:57 PM.