Skip to content

Commit

Permalink
✨ Make grid size changeable, add rendering CLI flags
Browse files Browse the repository at this point in the history
  • Loading branch information
gwennlbh committed Jan 1, 2023
1 parent b071619 commit 6a18df9
Show file tree
Hide file tree
Showing 9 changed files with 427 additions and 277 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
shapemaker

.vscode
test.svg
test.svg
gallery/myriad/bar*
gallery/myriad/piece*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# shapemaker
![shapemaker](title.png)

An experiment into the generation of 2D flat design abstract artwork using limited shape and color combinations, arranged in a 8-point grid.

Expand Down
2 changes: 1 addition & 1 deletion README.md.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# shapemaker
![shapemaker](title.png)

An experiment into the generation of 2D flat design abstract artwork using limited shape and color combinations, arranged in a 8-point grid.

Expand Down
1 change: 1 addition & 0 deletions colorschemes/palenight.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"black": "#676E95", "white": "#ffffff", "red": "#ff5572", "green": "#a9c77d", "blue": "#82AAFF", "yellow": "#FFCB6B", "orange": "#FFCB6B", "purple": "#C792EA", "brown": "#ff5572", "pink": "#C792EA", "gray": "#ffffff", "cyan": "#89DDFF"}
1 change: 1 addition & 0 deletions colorschemes/snazzy-light.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"black": "#565869", "white": "#FFFFFF", "red": "#FF5C57", "green": "#2DAE58", "blue": "#09A1ED", "yellow": "#F5B900", "orange": "#CF9C00", "purple": "#F767BB", "brown": "#FFAEAC", "pink": "#FF94D2", "gray": "#FAFBF9", "cyan": "#13BBB7"}
44 changes: 44 additions & 0 deletions gallery/myriad/generate
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env fish

set wipe " "

for i in (seq 1 16)
for j in (seq 1 9)
echo -ne Making piece $i:$j\r
shapemaker piece-$i-$j.svg --colors $argv[1] \
--grid-size 2x2 \
# --render-grid \
# --canvas-padding 0 \
# --objects-count 0..1 \
# --line-width 16 \
# --empty-shape-stroke 4 \
# --dot-radius 5 \
# --small-circle-radius 10 \
2>/dev/null &
end
end

wait
echo Made pieces$wipe

for f in piece-*.svg
set dest (echo $f | sd '.svg$' '.png')
echo -ne Converting $f to PNG...\r
rm $dest || true
convert -density 200 $f $dest &
end

wait
echo Converted all pieces to PNG$wipe

for j in (seq 1 9)
echo -ne Merging pieces into bar $j...\r
convert +append piece-*-$j.png bar-$j.png &
end

wait
echo Merged pieces into bars$wipe

echo Merging bars into myriad...
convert -append bar-*.png myriad.png
echo Done.
Binary file added gallery/myriad/myriad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6a18df9

Please sign in to comment.