Wrote matrix rotation script.