Vegetation plays a major role in the realistic display of outdoor scenes. However, manual plant placement can be tedious. For this reason this paper presents a new proposal in the field of procedural modeling of natural scenes. This method creates plant ecosystems that maximizes the covered space by optimizing an objective function subject to a series of constraints defined by a system of inequalities. This system includes the constraints of the environment taking into account characteristics of the terrain and the plant species involved. Once the inequality system has been defined, a solution will be obtained that tries to maximize the radius of the projected area of the trees and therefore the extension of the vegetation cover on the ground. The technique eliminates the trees that do not achieve a minimum growth radius, simulating the typical competitive process of nature. Results show the good performance and the high visual quality of the ecosystems obtained by the proposed technique. The use of this kind of optimization techniques could be used to solve other procedural modeling problems in other fields of application.