As a final challenge, I invented a new pattern where the cubes are added in a spiral pattern so that one side and one square is completed each time. I then noted how many squares were added each turn and came up with the function based on that. Thus far the function has to be split in two and doesn't look very pretty, but it works.
|