protected function getShapes($colorTheme, $hash)
    {
        $usedColorThemeIndexes = array();
        $categories = self::getCategories();
        $shapes = array();
        $colorCount = $colorTheme->getCount();
        
        foreach ($categories as $category) {
            $colorThemeIndex = 
                self::getOctet($hash, $category->colorIndex) % $colorCount;

            if (self::isDuplicate(
                    // Disallow dark gray and dark color combo
                    $usedColorThemeIndexes, $colorThemeIndex, array(0, 4)) || 
                self::isDuplicate(
                    // Disallow light gray and light color combo
                    $usedColorThemeIndexes, $colorThemeIndex, array(2, 3))
            ) {
                $colorThemeIndex = 1;
            }

            $usedColorThemeIndexes[] = $colorThemeIndex;

            $startRotationIndex = $category->rotationIndex === null ? 
                0 : self::getOctet($hash, $category->rotationIndex);
            $shapeIndex = 
                self::getOctet($hash, $category->shapeIndex) % 
                count($category->shapes);
            $shape = $category->shapes[$shapeIndex];
            
            $shapes[] = new Shape(
                /*$definition=*/ $shape,
                /*$color=*/ $colorTheme->getByIndex($colorThemeIndex),
                /*$positions=*/ $category->positions,
                /*$startRotationIndex=*/ $startRotationIndex
            );
        }
        
        return $shapes;
    }