Circular matrix generator