Skip to content

Commit 6228c09

Browse files
Add remaining implementations
1 parent cb290f2 commit 6228c09

4 files changed

Lines changed: 483 additions & 64 deletions

File tree

docs/demiregular-mapping.md

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,58 +8,53 @@ References: https://en.wikipedia.org/wiki/2-uniform_tiling
88

99
## Wikipedia Official 20 2-Uniform Tilings
1010

11-
| Wikipedia | Pixel2Plex | Method | Configuration | Notes |
12-
| --- | --- | --- | --- | --- |
13-
| n1 ||| (4.6.12 ; 3.4.6.4) | Not yet implemented |
14-
| n2 ||| (3.12.12 ; 3.4.3.12) | Not yet implemented |
15-
| n3 | #10 | `bi_sq_elongtri_b` | (4⁴ ; 3³.4²)₂ | ✓ Implemented |
16-
| n4 | #9 | `bi_sq_elongtri_a` | (4⁴ ; 3³.4²)₁ | ✓ Implemented |
17-
| n5 ||| (3.4.6.4 ; 3⁴.6) | Not yet implemented |
18-
| n6-n7, n11 | #0-2 | `bi_trihex_a/b/c` | (3.6.3.6 ; 3⁶) | ✓ Custom variants (3) |
19-
| n8 | #14 | `bi_rhombi_sq` | (3.4.6.4 ; 4⁴) | ✓ Implemented |
20-
| n9 | #13 | `bi_rhombi_tri` | (3.4.6.4 ; 3⁶) | ✓ Implemented |
21-
| n10, n12 ||| (3⁶ ; 3².6²) / (3².6² ; 3⁴.6) | Not yet implemented |
22-
| n14 | #5 | `bi_elongtri_a` | (3⁶ ; 3³.4²)₁ | ✓ Verified |
23-
| n15 | #6 | `bi_elongtri_b` | (3⁶ ; 3³.4²)₂ | ✓ Verified |
24-
| n16 | #7 | `bi_snubsq_a` | (3³.4² ; 3².4.3.4)₁ | ✓ Implemented |
25-
| n17 | #8 | `bi_snubsq_b` | (3³.4² ; 3².4.3.4)₂ | ✓ Implemented |
26-
| n18 ||| (3⁶ ; 3².4.3.4) | Not yet implemented |
27-
| n19 | #3 | `bi_snubhex_a` | (3⁶ ; 3⁴.6)₁ | ✓ Verified |
28-
| n20 | #4 | `bi_snubhex_b` | (3⁶ ; 3⁴.6)₂ | ✓ Verified |
11+
| Pixel2Plex | Method | Configuration | Notes |
12+
| --- | --- | --- | --- |
13+
| #20 | `bi_grandrhombi` | (4.6.12 ; 3.4.6.4) | ✓ Implemented |
14+
| #21 | `bi_dodec_snub` | (3.12.12 ; 3.4.3.12) | ✓ Implemented |
15+
| #10 | `bi_sq_elongtri_b` | (4⁴ ; 3³.4²)₂ | ✓ Implemented |
16+
| #9 | `bi_sq_elongtri_a` | (4⁴ ; 3³.4²)₁ | ✓ Implemented |
17+
| #22 | `bi_rhombi_snubhex` | (3.4.6.4 ; 3⁴.6) | ✓ Implemented |
18+
| #0-2 | `bi_trihex_a/b/c` | (3.6.3.6 ; 3⁶) | ✓ Custom variants (3) |
19+
| #14 | `bi_rhombi_sq` | (3.4.6.4 ; 4⁴) | ✓ Implemented |
20+
| #13 | `bi_rhombi_tri` | (3.4.6.4 ; 3⁶) | ✓ Implemented |
21+
| #23 | `bi_tri_hexhex` | (3⁶ ; 3².6²) | ✓ Implemented |
22+
| #24 | `bi_hexhex_snubhex` | (3².6² ; 3⁴.6) | ✓ Implemented |
23+
| #5 | `bi_elongtri_a` | (3⁶ ; 3³.4²)₁ | ✓ Implemented |
24+
| #6 | `bi_elongtri_b` | (3⁶ ; 3³.4²)₂ | ✓ Implemented |
25+
| #7 | `bi_snubsq_a` | (3³.4² ; 3².4.3.4)₁ | ✓ Implemented |
26+
| #8 | `bi_snubsq_b` | (3³.4² ; 3².4.3.4)₂ | ✓ Implemented |
27+
| #25 | `bi_tri_snubsq` | (3⁶ ; 3².4.3.4) | ✓ Implemented |
28+
| #3 | `bi_snubhex_a` | (3⁶ ; 3⁴.6)₁ | ✓ Implemented |
29+
| #4 | `bi_snubhex_b` | (3⁶ ; 3⁴.6)₂ | ✓ Implemented |
2930

30-
## Extended Implementations (Beyond Wikipedia 20)
31+
## Custom Variants (Beyond Wikipedia 20)
3132

3233
| Code | Method | Configuration | Notes |
3334
| --- | --- | --- | --- |
34-
| #11 | `bi_sq_snubhex` | (4⁴ ; 3⁴.6) | Custom: square + snub-hex |
35-
| #12 | `bi_snubsq_elongtri` | (3³.4² ; 3².4.3.4) | Custom: snub-square + rhombitrihexagonal |
36-
| #15 | `bi_snubhex_trihex` | (3⁴.6 ; 3.6.3.6) | Custom: snub-hex + trihex |
37-
| #16 | `bi_trihex_rhombi` | (3.6.3.6 ; 3.4.6.4) | Custom: trihex + rhombitrihex |
38-
| #17 | `bi_dodec_grandrhombi` | (3.12² ; 4.6.12) | Custom: truncated hexagonal + great rhombitrihex |
39-
| #18 | `bi_rhombi_grandrhombi` | (3.4.6.4 ; 4.6.12) | Custom: rhombitrihex + great rhombitrihex |
40-
| #19 | `bi_dodec_rhombi` | (3.12² ; 3.4.6.4) | Custom: truncated hexagonal + rhombitrihex |
35+
| #11 | `bi_sq_snubhex` | (4⁴ ; 3⁴.6) | Custom variant: square + snub-hex |
36+
| #12 | `bi_snubsq_elongtri` | (3³.4² ; 3².4.3.4) | Custom variant: snub-square + rhombitrihexagonal |
37+
| #15 | `bi_snubhex_trihex` | (3⁴.6 ; 3.6.3.6) | Custom variant: snub-hex + trihex |
38+
| #16 | `bi_trihex_rhombi` | (3.6.3.6 ; 3.4.6.4) | Custom variant: trihex + rhombitrihex |
39+
| #17 | `bi_dodec_grandrhombi` | (3.12² ; 4.6.12) | Custom variant: truncated hexagonal + great rhombitrihex |
40+
| #18 | `bi_rhombi_grandrhombi` | (3.4.6.4 ; 4.6.12) | Custom variant: rhombitrihex + great rhombitrihex |
41+
| #19 | `bi_dodec_rhombi` | (3.12² ; 3.4.6.4) | Custom variant: truncated hexagonal + rhombitrihex |
4142

4243
## Naming Convention
4344

4445
- Code uses Wikipedia vertex configuration notation: `(type1 ; type2)` with subscripts ₁, ₂ for variants
4546
- Internal method names use French descriptive labels: `bi_trihex_a`, `bi_snubhex_b`, etc.
4647
- Variants marked with `_1` and `_2` correspond to different symmetry groups
47-
- `_1`: Usually p6 or p2 (more symmetric)
48-
- `_2`: Usually cmm, pmg, or p4g (less symmetric, glide reflection)
4948

5049
## Implementation Status
5150

52-
**Verified** (4 tilings): n14, n15, n19, n20
53-
**Implemented** (12 tilings): n3, n4, n6, n7, n8, n9, n11, n13, n16, n17
54-
**Not implemented** (4 tilings): n1, n2, n5, n10, n12, n18
55-
+ **Extended** (7 custom tilings): Beyond Wikipedia 20
51+
**All 20 canonical 2-uniform tilings** are implemented
52+
+ **7 custom variant tilings** beyond the Wikipedia 20
5653

5754
## Geometry Notes
5855

59-
- All Wikipedia tilings use edge-uniform tilings (all edges same length `a`)
60-
- Methods n14 & n15 are correctly verified against Wikipedia reference images
61-
- Methods n19 & n20 are correctly verified with proper row/column alternation
62-
- Extended tilings (#11-19) are additional variants mixing canonical vertex types
56+
- All tilings use edge-uniform tilings (all edges same length `a`)
57+
- Custom variant tilings (#11-19) are additional variants mixing canonical vertex types
6358

6459
## References
6560

public/app.js

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ const DENSITE_METHODE = {
1616
bi_dodec_grandrhombi: 0.20,
1717
bi_rhombi_grandrhombi: 0.15,
1818
bi_dodec_rhombi: 0.25,
19+
bi_grandrhombi: 0.20,
20+
bi_dodec_snub: 0.25,
21+
bi_rhombi_snubhex: 1.10,
22+
bi_tri_hexhex: 1.20,
23+
bi_hexhex_snubhex: 1.30,
24+
bi_tri_snubsq: 1.60,
1925
};
2026

2127
const METHODES = {
@@ -32,6 +38,12 @@ const METHODES = {
3238
bi_dodec_grandrhombi: 17,
3339
bi_rhombi_grandrhombi: 18,
3440
bi_dodec_rhombi: 19,
41+
bi_grandrhombi: 20,
42+
bi_dodec_snub: 21,
43+
bi_rhombi_snubhex: 22,
44+
bi_tri_hexhex: 23,
45+
bi_hexhex_snubhex: 24,
46+
bi_tri_snubsq: 25,
3547
};
3648

3749
const EXPORTS_CODES = {
@@ -55,9 +67,15 @@ const EXPORTS_CODES = {
5567
bi_dodec_grandrhombi: "code_bi_dodec_grandrhombi",
5668
bi_rhombi_grandrhombi: "code_bi_rhombi_grandrhombi",
5769
bi_dodec_rhombi: "code_bi_dodec_rhombi",
70+
bi_grandrhombi: "code_bi_grandrhombi",
71+
bi_dodec_snub: "code_bi_dodec_snub",
72+
bi_rhombi_snubhex: "code_bi_rhombi_snubhex",
73+
bi_tri_hexhex: "code_bi_tri_hexhex",
74+
bi_hexhex_snubhex: "code_bi_hexhex_snubhex",
75+
bi_tri_snubsq: "code_bi_tri_snubsq",
5876
};
5977

60-
// Définition des 20 pavages 2-uniformes, groupés par paire de sommets
78+
// Définition des pavages 2-uniformes, groupés par paire de sommets
6179
const GROUPES_GALERIE = [
6280
{
6381
titre: "[3\xB7 6\xB7 3\xB7 6\u00A0;\u00A03\u2076]",
@@ -163,6 +181,48 @@ const GROUPES_GALERIE = [
163181
{ methode: "bi_dodec_rhombi", nom: "Dodéc. tronq. + rhombitrihex", notation: "3.12.12 + 3.4.6.4", desc: "Dodécagones avec triangles (paires) et carrés (impaires).", c1: "#100a20", c2: "#818cf8" },
164182
],
165183
},
184+
{
185+
titre: "[4\xB7 6\xB7 12\u00A0;\u00A03\xB7 4\xB7 6\xB7 4]",
186+
notation: "4.6.12 + 3.4.6.4",
187+
tuiles: [
188+
{ methode: "bi_grandrhombi", nom: "Grand rhombitrihex", notation: "4.6.12 + 3.4.6.4", desc: "Dodécagones avec hexagones (paires) et carrés (impaires).", c1: "#1a0818", c2: "#f472b6" },
189+
],
190+
},
191+
{
192+
titre: "[3\xB7 12\xB2\u00A0;\u00A03\xB7 4\xB7 3\xB7 12]",
193+
notation: "3.12.12 + 3.4.3.12",
194+
tuiles: [
195+
{ methode: "bi_dodec_snub", nom: "Dodéc. + snub", notation: "3.12.12 + 3.4.3.12", desc: "Dodécagones avec triangles (paires) et carrés (impaires).", c1: "#0c0818", c2: "#c084fc" },
196+
],
197+
},
198+
{
199+
titre: "[3\xB7 4\xB7 6\xB7 4\u00A0;\u00A03\u2074\xB7 6]",
200+
notation: "3.4.6.4 + 3.3.3.3.6",
201+
tuiles: [
202+
{ methode: "bi_rhombi_snubhex", nom: "Rhombitrihex + snub-hex", notation: "3.4.6.4 + 3.3.3.3.6", desc: "Rangées alternant rhombitrihexagonal et snub-hexagonal.", c1: "#081810", c2: "#22c55e" },
203+
],
204+
},
205+
{
206+
titre: "[3\u2076\u00A0;\u00A03\xB2\xB7 6\xB2]",
207+
notation: "3\u2076 + 3.3.6.6",
208+
tuiles: [
209+
{ methode: "bi_tri_hexhex", nom: "Triangles + hex. jumels", notation: "3\u2076 + 3.3.6.6", desc: "Paires d\u2019hexagones partageant une arête, triangles comblant les espaces.", c1: "#0a1418", c2: "#06b6d4" },
210+
],
211+
},
212+
{
213+
titre: "[3\xB2\xB7 6\xB2\u00A0;\u00A03\u2074\xB7 6]",
214+
notation: "3.3.6.6 + 3.3.3.3.6",
215+
tuiles: [
216+
{ methode: "bi_hexhex_snubhex", nom: "Hex. jumels + snub-hex", notation: "3.3.6.6 + 3.3.3.3.6", desc: "Hexagones avec triangles simples et snub-hex en alternance.", c1: "#10080a", c2: "#fb7185" },
217+
],
218+
},
219+
{
220+
titre: "[3\u2076\u00A0;\u00A03\xB2\xB7 4\xB7 3\xB7 4]",
221+
notation: "3\u2076 + 3.3.4.3.4",
222+
tuiles: [
223+
{ methode: "bi_tri_snubsq", nom: "Triangles + snub-carré", notation: "3\u2076 + 3.3.4.3.4", desc: "Carrés snub avec bandes de triangles purs entre les rangées.", c1: "#18100a", c2: "#f59e0b" },
224+
],
225+
},
166226
];
167227

168228
// ── État de l'application ──────────────────────────────────────

public/index.html

Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -75,54 +75,72 @@ <h1>Pixel2Plex</h1>
7575
<p class="ctrl-title">Pavage d&eacute;mir&eacute;gulier</p>
7676
<label class="select-wrap" for="method-select">
7777
<select id="method-select" aria-label="Forme des tuiles">
78-
<optgroup label="n6-n7, n11 &mdash; (3.6.3.6 ; 3&#x2076;) [custom variants]">
78+
<optgroup label="(3.6.3.6 ; 3&#x2076;) &mdash; variantes">
7979
<option value="bi_trihex_a" selected>Damier trihex&#x2215;triangles</option>
8080
<option value="bi_trihex_b">Rangées trihex&#x2215;triangles</option>
8181
<option value="bi_trihex_c">Colonnes trihex&#x2215;triangles</option>
8282
</optgroup>
83-
<optgroup label="n19-n20 &mdash; (3&#x2076; ; 3&#x2074;.6)">
84-
<option value="bi_snubhex_a">n19 &#x2014; Snub-hex damier (p6)</option>
85-
<option value="bi_snubhex_b">n20 &#x2014; Snub-hex rangées (cmm)</option>
83+
<optgroup label="(3&#x2076; ; 3&#x2074;.6)">
84+
<option value="bi_snubhex_a">Snub-hex damier</option>
85+
<option value="bi_snubhex_b">Snub-hex rangées</option>
8686
</optgroup>
87-
<optgroup label="n14-n15 &mdash; (3&#x2076; ; 3&#xB3;.4&#xB2;)">
88-
<option value="bi_elongtri_a">n14 &#x2014; Allong&eacute; + double bande (p2)</option>
89-
<option value="bi_elongtri_b">n15 &#x2014; Allong&eacute; colonnes alt. (cmm)</option>
87+
<optgroup label="(3&#x2076; ; 3&#xB3;.4&#xB2;)">
88+
<option value="bi_elongtri_a">Allong&eacute; + double bande</option>
89+
<option value="bi_elongtri_b">Allong&eacute; colonnes alt.</option>
9090
</optgroup>
91-
<optgroup label="n16-n17 &mdash; (3&#xB3;.4&#xB2; ; 3&#xB2;.4.3.4)">
92-
<option value="bi_snubsq_a">n16 &#x2014; Snub-carré int&eacute;rieurs (p4g)</option>
93-
<option value="bi_snubsq_b">n17 &#x2014; Snub-carré &eacute;largis (pmg)</option>
91+
<optgroup label="(3&#xB3;.4&#xB2; ; 3&#xB2;.4.3.4)">
92+
<option value="bi_snubsq_a">Snub-carré int&eacute;rieurs</option>
93+
<option value="bi_snubsq_b">Snub-carré &eacute;largis</option>
9494
</optgroup>
95-
<optgroup label="n4, n3 &mdash; (4&#x2074; ; 3&#xB3;.4&#xB2;)">
96-
<option value="bi_sq_elongtri_a">n4 &#x2014; Carré + allong&eacute; (p4g)</option>
97-
<option value="bi_sq_elongtri_b">n3 &#x2014; Carré + allong&eacute; (pmg)</option>
95+
<optgroup label="(4&#x2074; ; 3&#xB3;.4&#xB2;)">
96+
<option value="bi_sq_elongtri_a">Carré + allong&eacute; a</option>
97+
<option value="bi_sq_elongtri_b">Carré + allong&eacute; b</option>
9898
</optgroup>
99-
<optgroup label="Custom &mdash; (4&#x2074; ; 3&#x2074;.6)">
99+
<optgroup label="(4&#x2074; ; 3&#x2074;.6) &mdash; variante">
100100
<option value="bi_sq_snubhex">Carrés + snub-hex</option>
101101
</optgroup>
102-
<optgroup label="Custom &mdash; (3&#xB3;.4&#xB2; ; 3&#xB2;.4.3.4)">
102+
<optgroup label="(3&#xB3;.4&#xB2; ; 3&#xB2;.4.3.4) &mdash; variante">
103103
<option value="bi_snubsq_elongtri">Snub-carré + allong&eacute;</option>
104104
</optgroup>
105-
<optgroup label="n9 &mdash; (3.4.6.4 ; 3&#x2076;)">
105+
<optgroup label="(3.4.6.4 ; 3&#x2076;)">
106106
<option value="bi_rhombi_tri">Rhombitrihex + triangles</option>
107107
</optgroup>
108-
<optgroup label="n8 &mdash; (3.4.6.4 ; 4&#x2074;)">
108+
<optgroup label="(3.4.6.4 ; 4&#x2074;)">
109109
<option value="bi_rhombi_sq">Rhombitrihex + carr&eacute;s</option>
110110
</optgroup>
111-
<optgroup label="Custom &mdash; (3&#x2074;.6 ; 3.6.3.6)">
111+
<optgroup label="(3&#x2074;.6 ; 3.6.3.6) &mdash; variante">
112112
<option value="bi_snubhex_trihex">Snub-hex + trihex</option>
113113
</optgroup>
114-
<optgroup label="Custom &mdash; (3.6.3.6 ; 3.4.6.4)">
114+
<optgroup label="(3.6.3.6 ; 3.4.6.4) &mdash; variante">
115115
<option value="bi_trihex_rhombi">Trihex + rhombitrihex</option>
116116
</optgroup>
117-
<optgroup label="Custom &mdash; (3.12&#xB2; ; 4.6.12)">
117+
<optgroup label="(3.12&#xB2; ; 4.6.12) &mdash; variante">
118118
<option value="bi_dodec_grandrhombi">Dodéc. tronqué + grand rhombi</option>
119119
</optgroup>
120-
<optgroup label="Custom &mdash; (3.4.6.4 ; 4.6.12)">
120+
<optgroup label="(3.4.6.4 ; 4.6.12) &mdash; variante">
121121
<option value="bi_rhombi_grandrhombi">Rhombi + grand rhombitrihex</option>
122122
</optgroup>
123-
<optgroup label="Custom &mdash; (3.12&#xB2; ; 3.4.6.4)">
123+
<optgroup label="(3.12&#xB2; ; 3.4.6.4) &mdash; variante">
124124
<option value="bi_dodec_rhombi">Dodéc. tronqué + rhombitrihex</option>
125125
</optgroup>
126+
<optgroup label="(4.6.12 ; 3.4.6.4)">
127+
<option value="bi_grandrhombi">Grand rhombitrihex</option>
128+
</optgroup>
129+
<optgroup label="(3.12&#xB2; ; 3.4.3.12)">
130+
<option value="bi_dodec_snub">Dodéc. + snub</option>
131+
</optgroup>
132+
<optgroup label="(3.4.6.4 ; 3&#x2074;.6)">
133+
<option value="bi_rhombi_snubhex">Rhombitrihex + snub-hex</option>
134+
</optgroup>
135+
<optgroup label="(3&#x2076; ; 3&#xB2;.6&#xB2;)">
136+
<option value="bi_tri_hexhex">Triangles + hex. jumelés</option>
137+
</optgroup>
138+
<optgroup label="(3&#xB2;.6&#xB2; ; 3&#x2074;.6)">
139+
<option value="bi_hexhex_snubhex">Hex. jumelés + snub-hex</option>
140+
</optgroup>
141+
<optgroup label="(3&#x2076; ; 3&#xB2;.4.3.4)">
142+
<option value="bi_tri_snubsq">Triangles + snub-carré</option>
143+
</optgroup>
126144
</select>
127145
</label>
128146
</div>
@@ -170,8 +188,8 @@ <h1>Pixel2Plex</h1>
170188
<div class="gallery-header">
171189
<h2>Galerie des pavages d&eacute;mir&eacute;guliers</h2>
172190
<p>Pavages <strong>k-uniformes</strong> (k &ge; 2) &mdash; chaque sommet appartient &agrave; exactement
173-
<strong>k</strong> types de configurations de sommets distincts. Les 20 pavages&nbsp;2-uniformes sont
174-
impl&eacute;ment&eacute;s. Les pavages 3-uniformes (61) et 4-uniformes (151) sont r&eacute;f&eacute;renc&eacute;s.</p>
191+
<strong>k</strong> types de configurations de sommets distincts. Les 20 pavages&nbsp;2-uniformes canoniques et
192+
des variantes sont impl&eacute;ment&eacute;s. Les pavages 3-uniformes (61) et 4-uniformes (151) sont r&eacute;f&eacute;renc&eacute;s.</p>
175193
<div class="gallery-filter-bar">
176194
<button type="button" class="filter-btn active" data-k="2">2-uniformes (20)</button>
177195
<button type="button" class="filter-btn" data-k="3">3-uniformes (61)</button>
@@ -226,7 +244,7 @@ <h3 id="sg-fichiers" class="source-group-title">Fichiers sources</h3>
226244
<article class="source-card source-card-file">
227245
<h4><span class="filename-pill">src/demiregulier_wasm.ml</span></h4>
228246
<p>Module WASM principal &mdash; primitives g&eacute;om&eacute;triques et
229-
20&nbsp;g&eacute;n&eacute;rateurs de pavages 2-uniformes en multilingual
247+
G&eacute;n&eacute;rateurs de pavages 2-uniformes en multilingual
230248
fran&ccedil;ais. Compil&eacute; vers <code>public/demiregulier.wasm</code>.</p>
231249
</article>
232250

@@ -270,7 +288,7 @@ <h4><code>sortie_ptr()</code></h4>
270288

271289
<article class="source-card source-card-export">
272290
<h4><code>code_bi_*()</code></h4>
273-
<p>20&nbsp;fonctions retournant le code entier de chaque m&eacute;thode de pavage.</p>
291+
<p>Fonctions retournant le code entier de chaque m&eacute;thode de pavage.</p>
274292
</article>
275293

276294
</div>
@@ -298,7 +316,7 @@ <h4>Compilation</h4>
298316

299317
<!-- Barre de statut -->
300318
<section class="hero">
301-
<p>Pixel2Plex pave une image avec les 20&nbsp;pavages 2-uniformes (d&eacute;mir&eacute;guliers),
319+
<p>Pixel2Plex pave une image avec les pavages 2-uniformes (d&eacute;mir&eacute;guliers),
302320
fond&eacute;s sur des polygones r&eacute;guliers de m&ecirc;me ar&ecirc;te.</p>
303321
<p id="wasm-status" class="hero-note">V&eacute;rification du moteur WASM&hellip;</p>
304322
</section>

0 commit comments

Comments
 (0)