Compare commits
5 commits
8017c48181
...
1f014aaad5
Author | SHA1 | Date | |
---|---|---|---|
|
1f014aaad5 | ||
|
ad4b24d415 | ||
|
5d08d18678 | ||
|
e7c34ebd49 | ||
|
b5d74b53a3 |
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1 @@
|
|||
build/
|
||||
build/
|
||||
|
|
11
Makefile
11
Makefile
|
@ -1,15 +1,20 @@
|
|||
suits := puppets bread wheels blades chairs cards
|
||||
suits := blades puppets chairs bread cards wheels
|
||||
values := 1 2 3 4 5 6 traveler knight wizard noble
|
||||
nobles := count-of-cards queen-of-puppets earl-of-bread scion-of-blades prince-of-wheels regent-of-chairs
|
||||
cards := $(foreach suit,$(suits),$(foreach value,$(values),$(value)-$(suit)))
|
||||
svgcards := $(foreach card,$(cards),build/$(card).svg)
|
||||
pngcards := $(foreach card,$(cards),build/$(card).png)
|
||||
|
||||
svgdeck: $(foreach card,$(cards),build/$(card).svg)
|
||||
svgdeck: $(svgcards)
|
||||
|
||||
pngdeck: $(foreach card,$(cards),build/$(card).png)
|
||||
pngdeck: $(pngcards)
|
||||
|
||||
build/%.svg: deck.asy cards.asy numerals.asy suits.asy nobles.asy $(foreach suit,$(suits),$(suit).asy) $(foreach noble,$(nobles),$(noble).asy)
|
||||
mkdir -p build
|
||||
sh -c "buf_size=5000000 asy -globalwrite deck.asy"
|
||||
|
||||
build/sample.png: $(svgcards)
|
||||
montage -density 100 -background transparent $(svgcards) -tile 10x6 -geometry +0+0 build/sample.png
|
||||
|
||||
build/%.png: build/%.svg
|
||||
convert -density 512 -background transparent $< $@
|
||||
|
|
12
cards.asy
12
cards.asy
|
@ -11,7 +11,7 @@ path corner = arc(((width/2 - corner_radius), (height/2 - corner_radius)), corne
|
|||
path card = corner--reverse(reflect((0,0), (0,1))*corner)--rotate(180)*corner--reverse(reflect((0,0), (1,0))*corner)--cycle;
|
||||
|
||||
real scpx = 0.2;
|
||||
real scpy = 0.35;
|
||||
real scpy = 0.325;
|
||||
|
||||
transform placements[][] = {
|
||||
// 0
|
||||
|
@ -39,13 +39,13 @@ transform placements[][] = {
|
|||
{}, {}, {}, {},
|
||||
};
|
||||
|
||||
real scale_factor = 0.15;
|
||||
real scale_factor = 0.175;
|
||||
real one_scale_factor = 0.4;
|
||||
|
||||
real numeral_scale_factor = 0.15;
|
||||
pair numeral_pos = (-width*0.38, height*0.4);
|
||||
real indicator_scale_factor = 0.1;
|
||||
pair indicator_pos = (-width*0.38, height*0.25);
|
||||
real numeral_scale_factor = 0.125;
|
||||
pair numeral_pos = (-width*0.4, height*0.4);
|
||||
real indicator_scale_factor = 0.085;
|
||||
pair indicator_pos = (-width*0.4, height*0.275);
|
||||
|
||||
// note: if you bump this depth value to 4, you'll need to set
|
||||
// buf_size=5000000 so latex doesn't choke
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
import "cards.asy" as cards;
|
||||
import "numerals.asy" as numerals;
|
||||
import "suits.asy" as suits;
|
||||
|
||||
int suit = PUPPETS;
|
||||
int value = 5;
|
||||
filldraw(card, white, black);
|
||||
|
||||
currentpen = evenodd+suit_colors[suit];
|
||||
|
||||
if (suit == CARDS && value == 1) {
|
||||
// due to exponential growth, with the larger suit icon on the 1
|
||||
// card, the endpoint of the recursion is a *lot* more visible
|
||||
fill(recursive_card(value, suit, 6));
|
||||
} else if (suit == CARDS && value > 6) {
|
||||
// conversely, face cards don't need as much recursion depth
|
||||
// because the only icons present are significantly smaller
|
||||
fill(recursive_card(value, suit, 3));
|
||||
} else {
|
||||
//fill(recursive_card(value, CARDS, 1), evenodd+lightgrey);
|
||||
fill(recursive_card(value, suit);
|
||||
}
|
Loading…
Reference in a new issue