diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e31cae..63f1ac7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change log +## 0.2.0 + * Tweak: The coordinate for prime 13 in 3D `WGP()` is a little longer. [#18](https://github.com/xenharmonic-devs/ji-lattice/issues/18) + * Redesign: Presets like `scottDakota24()` now work with default order of prime numbers. [#19](https://github.com/xenharmonic-devs/ji-lattice/issues/19) + ## 0.1.0 * Feature: 3-dimensional prime lattices. diff --git a/src/__tests__/lattice-3d.spec.ts b/src/__tests__/lattice-3d.spec.ts index f153cf2..3123791 100644 --- a/src/__tests__/lattice-3d.spec.ts +++ b/src/__tests__/lattice-3d.spec.ts @@ -39,6 +39,12 @@ describe('Wilson-Grady-Pakkanen lattice', () => { {x1: 80, y1: 0, z1: 0, x2: 80, y2: 0, z2: 40, type: 'primary'}, // 9 -> 63 ]); }); + + it('has a short but not too short vector associated with prime 13', () => { + const thirteen = toMonzo(13); + const {vertices} = spanLattice3D([thirteen], WGP9()); + expect(vertices).toEqual([{index: 0, x: -8, y: -4, z: 7}]); + }); }); describe('Prime sphere coordinates', () => { diff --git a/src/lattice-3d.ts b/src/lattice-3d.ts index 4f9c9f1..8930dfe 100644 --- a/src/lattice-3d.ts +++ b/src/lattice-3d.ts @@ -64,7 +64,7 @@ const WGP_X = [23, 40, 0, 0, -14, -8, -5, 0, 20]; // Y-coordinates for every prime up to 23. const WGP_Y = [-45, 0, -40, 0, -18, -4, -32, -25, -3]; // Z-coordinates for every prime up to 23. -const WGP_Z = [19, 0, 0, 40, 13, 2, 5, 9, 15]; +const WGP_Z = [19, 0, 0, 40, 13, 7, 5, 9, 15]; /** * Combine edges that share an endpoint and slope into longer ones.