Skip to content

Commit

Permalink
Make prime 13 a little longer in 3D WGP
Browse files Browse the repository at this point in the history
ref #18
  • Loading branch information
frostburn committed Jun 10, 2024
1 parent 6daea02 commit a41bf23
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
6 changes: 6 additions & 0 deletions src/__tests__/lattice-3d.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/lattice-3d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a41bf23

Please sign in to comment.