module Grid(num_x, num_y, spacing_x, spacing_y) { for ($xi=[0:num_x-1]) { for ($yi=[0:num_y-1]) { $ei = $xi + num_x*$yi; translate([spacing_x*$xi, spacing_y*$yi, 0]) children(); } } } module Element() { text(str($params[$ei])); } vals = [for (x=[0:10*9-1]) x*x]; Grid(10, 9, 50, 15, $params=vals) Element();