In order to solve some classic problems in traditional topology optimization, such as unknown material distribution, checker-boarding and curse of dimensionality, this thesis introduces a new method to construct a mechanical structure that can reduce mass and increase stiffness. It uses a graph to represent the skeleton of a structure. An implicit surface function is used to convert the skeleton to a three-dimensional geometry. A two step optimization is performed to optimize the structure globally and locally. The result shows this method can find a structure with low volume and high stiffness while the continuity and smoothness of the surface is guaranteed. The number of the design variables is also reduced significantly.