This is a Python program that generates a multi-scale plaid pattern designed for "urban camouflage." The pattern consists of recursive plaid grids, with user-controllable colors, recursion depth, and other parameters. The output can be displayed or saved as an image file.
- Generate plaid camouflage patterns with multi-scale recursion.
- Use either urban-inspired or neon-inspired color palettes.
- Customize pattern parameters such as the number of colors, recursion depth, line thickness, and scaling factor.
- Save the generated pattern as a PNG image.
-
Clone the repository:
git clone https://github.com/danmcne/disruptive-plaid-generator.git cd disruptive-plaid-generator -
Install the required Python packages:
pip install matplotlib numpy
You can run the program directly from the command line. Below are the command-line arguments that can be used to customize the generated pattern:
| Argument | Type | Default | Description |
|---|---|---|---|
--seed |
int |
42 |
Random seed for reproducibility. |
--num_colors |
int |
5 |
Number of colors to use from the palette. |
--palette |
str |
"urban" |
Color palette to use (urban or neon). |
--recursion_depth |
int |
4 |
How deep the recursive pattern goes. Higher depth increases complexity. |
--line_thickness |
float |
2 |
Thickness of the lines in the plaid pattern. |
--scale_factor |
float |
0.5 |
Scaling factor for recursion. Smaller values result in finer patterns. |
--output |
str |
File path to save the generated pattern as an image. If not provided, the pattern will be displayed. |
python plaid_camo_gen.pypython plaid_camo_gen.py --seed 42 --num_colors 6 --palette urban --recursion_depth 5 --line_thickness 3 --scale_factor 0.6 --output pattern.pngpython plaid_camo_gen.py --seed 56 --num_colors 7 --palette neon --recursion_depth 4 --line_thickness 1.5 --scale_factor 0.7- Urban: Inspired by urban environments with a mix of greys, blues, greens, and earthy tones.
- Neon: Bright, eye-catching colors inspired by neon lights.
The program recursively generates a plaid pattern by subdividing the canvas into grids and assigning colors to both squares and the lines separating them. With each recursion level, the grid becomes finer, creating a multi-scale pattern. This can be used to simulate camouflage in urban settings or just to generate cool abstract patterns.
- Python 3.x
- Matplotlib: Used for drawing the patterns.
- NumPy: For array handling and calculations.
Install dependencies using:
pip install matplotlib numpyThis project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Feel free to open issues or submit pull requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature-branch) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature-branch) - Open a Pull Request
For any questions or feedback, feel free to reach out via GitHub or create an issue in the repository.