Compare commits
No commits in common. "1f014aaad5edaa42cfcef8b9d4bd51042fc5903d" and "8017c481819d02f6119b74c2336e82f11d6d04aa" have entirely different histories.
1f014aaad5
...
8017c48181
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1 @@
|
|||
build/
|
||||
build/
|
11
Makefile
11
Makefile
|
@ -1,20 +1,15 @@
|
|||
suits := blades puppets chairs bread cards wheels
|
||||
suits := puppets bread wheels blades chairs cards
|
||||
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: $(svgcards)
|
||||
svgdeck: $(foreach card,$(cards),build/$(card).svg)
|
||||
|
||||
pngdeck: $(pngcards)
|
||||
pngdeck: $(foreach card,$(cards),build/$(card).png)
|
||||
|
||||
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.325;
|
||||
real scpy = 0.35;
|
||||
|
||||
transform placements[][] = {
|
||||
// 0
|
||||
|
@ -39,13 +39,13 @@ transform placements[][] = {
|
|||
{}, {}, {}, {},
|
||||
};
|
||||
|
||||
real scale_factor = 0.175;
|
||||
real scale_factor = 0.15;
|
||||
real one_scale_factor = 0.4;
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
// note: if you bump this depth value to 4, you'll need to set
|
||||
// buf_size=5000000 so latex doesn't choke
|
||||
|
|
22
single-card.asy
Normal file
22
single-card.asy
Normal file
|
@ -0,0 +1,22 @@
|
|||
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