Please refer to the following link for the information on how complex models, even complete HFSS projects can be created with Matlab. This package has all the source codes and typical examples.
**broken link removed**
By the way, HFSS version 10 can draw complex models directly using some math functions.
It's a commercial software from Ansoft: **broken link removed**. Although they provide student versions for some of their products such as Designer, Emsemble etc. I don't think they provide similar versions for HFSS. However, if your company/university has the licence and pay the annual maintenance fee, you should be able to ask the support engineer from Ansoft to upgrade the version 9.x to 10.x for you.