Natural systems are optimized for the loading conditions they are subjected to and its geometry and material properties change according to stress or strain requirements. Current Additive manufacturing technologies consider the design and fabrication of physical elements with homogeneous material properties, not heterogeneous composite materials with varying material distribution, called Functionally-Graded Materials (FGM). With FGMs it is possible to take into account different functional requirements in the design, simulation and fabrication of construction elements, optimized for specific thermo-mechanical conditions. In this work, we present a new strategy developed to optimize material composition, using a graphical algorithm editor together with FEM software. The proposed algorithm adjusts the multi-material ratio locally, according to the stress map, simulating nature’s structural behavior.