As the booming of personalized customization and special functions of three-dimensional (3D) printed parts, single material 3D printed parts can no longer meet the demand of actual working conditions, and 3D printing technology of multi-material parts has become a research hotspot in the rapid prototyping industry. Modeling is one of the key technologies for 3D printing of multi-material parts. In this paper, first, a method of gradient source modeling based on control points is proposed. In geometric modeling, this method considers that spatial geometric models are composed of points in space, and in material modeling, and the idea of "gradient source" is used to represent multi-material parts with color gradient according to the formula of material component gradient change. Then, VS2013 and OpenGL programming languages are used for visual modeling representation and analysis of single gradient source parts. Finally, on the basis of single-gradient source modeling, two different gradient sources are weighted by using operation symbol "circle times", and three kinds of material parts are presented and analyzed visually. The multi-material parts manufactured by the proposed modeling method by optical processing technology can well avoid adverse effects such as stress concentration and thermal failure caused by the rapid change of material composition in the multi-material parts.