2 added 306 characters in body edited Jun 11 '13 at 11:33 Aky 2,09288 silver badges1818 bronze badges Update Simpler way of generating a "concentric" matrix, without having to convert to an image to apply a distance transform:  With[{size = 11}, Array[Max[#1, #2, size + 1 - #1, size + 1 - #2] &, {size, size}] /. {_?OddQ -> "0", _?EvenQ -> "*"}]  End update Here's a hare-brained implementation that uses DistanceTransform[]: First create an image with a single background (value 0) pixel at the center, and remaining pixels all foreground (value 1): img = Image[SparseArray[{6, 6} -> 0, {11, 11}, 1]] Take the distance transform with the chessboard metric: mat = Round@ImageData@DistanceTransform[img, DistanceFunction -> ChessboardDistance] giving Now simply use rule-based replacement mat /. {_?EvenQ -> "*", _?OddQ -> "0"} // MatrixForm to get the desired result. Here's a hare-brained implementation that uses DistanceTransform[]: First create an image with a single background (value 0) pixel at the center, and remaining pixels all foreground (value 1): img = Image[SparseArray[{6, 6} -> 0, {11, 11}, 1]] Take the distance transform with the chessboard metric: mat = Round@ImageData@DistanceTransform[img, DistanceFunction -> ChessboardDistance] giving Now simply use rule-based replacement mat /. {_?EvenQ -> "*", _?OddQ -> "0"} // MatrixForm to get the desired result. Update Simpler way of generating a "concentric" matrix, without having to convert to an image to apply a distance transform:  With[{size = 11}, Array[Max[#1, #2, size + 1 - #1, size + 1 - #2] &, {size, size}] /. {_?OddQ -> "0", _?EvenQ -> "*"}]  End update Here's a hare-brained implementation that uses DistanceTransform[]: First create an image with a single background (value 0) pixel at the center, and remaining pixels all foreground (value 1): img = Image[SparseArray[{6, 6} -> 0, {11, 11}, 1]] Take the distance transform with the chessboard metric: mat = Round@ImageData@DistanceTransform[img, DistanceFunction -> ChessboardDistance] giving Now simply use rule-based replacement mat /. {_?EvenQ -> "*", _?OddQ -> "0"} // MatrixForm to get the desired result. 1 answered Jun 11 '13 at 10:35 Aky 2,09288 silver badges1818 bronze badges Here's a hare-brained implementation that uses DistanceTransform[]: First create an image with a single background (value 0) pixel at the center, and remaining pixels all foreground (value 1): img = Image[SparseArray[{6, 6} -> 0, {11, 11}, 1]] Take the distance transform with the chessboard metric: mat = Round@ImageData@DistanceTransform[img, DistanceFunction -> ChessboardDistance] giving Now simply use rule-based replacement mat /. {_?EvenQ -> "*", _?OddQ -> "0"} // MatrixForm to get the desired result.