Patterns on cubes