hmt has given u a right answer, u have to build ur own 3d cad system to define all geometrical aspects, like bazier curves, translators, equation compilors. it will be good if u consult book like CAD CAM By Abrahim ZEID. although u can make a simple models by using c++ but cannot generalise it that will work only for 1.