We propose a generalization of small world networks, in which the reconnection of links is governed by a function that depends on the distance between the elements to be linked. An adequate choice of this function lets us control the clusterization of the system. Control of the clusterization, in turn, allows the generation of a wide variety of topologies.