Abstract: The main problem in the full design and optimization of heliostats fields for Solar Power Tower (SPT) systems is the recalculation of the shadings and blockings for each heliostat in the field at every stage of the optimization process while the layout is being modified. To make easier the solution to this complex problem, a new code, called campo , for the design and performance analysis of heliostat fields, is presented in this paper. The code campo , based on the Matlab type cell data structure, is able to generate regular but flexible radial staggered layouts of heliostat fields. A major feature of campo is the ability to perform fast and accurate calculations of the shadowing and blocking factor for each and every one of the heliostats in the field. Further, the data structure of the code allows an efficient selection of the relevant blocking and shading neighbours even while the layout is being changed. Both distinctive features are analysed here in depth. In this new code, the optimization would proceed from densest fields, with the worst shadowing and blocking factor, towards expanded fields. Several options to gradually expand the starting dense layouts are successfully checked. This code would allow a full optimization process in which the thousands of heliostat coordinates would be actually included in the optimum search.