var pitch = 450; var width = 400; var height = 400; var N = 5; var bitmap_width = (N-1)*pitch+width; var bitmap_height = (N-1)*pitch+height; var doc = app.documents.add(DocumentColorSpace.RGB, bitmap_width, bitmap_height); var artLayer = doc.layers[0]; var newRGBColor = new RGBColor(); newRGBColor.red =0; newRGBColor.green = 0; newRGBColor.blue = 0; doc.defaultFillColor = newRGBColor; doc.defaultStroked = false; app.defaultFilled = true; for (Ny=0; Ny