diff --git a/README.md b/README.md index 93b7d60..c35a7c3 100644 --- a/README.md +++ b/README.md @@ -98,15 +98,15 @@ The cubic projection. The pentagonal dodecahedral projection. -# d3.geoRhombicDodecahedral() · [Source](https://github.com/d3/d3-geo-polygon/blob/main/src/polyhedral/rhombic.js), [Examples](https://observablehq.com/d/881a8431e638b408) +# d3.geoRhombic() · [Source](https://github.com/d3/d3-geo-polygon/blob/main/src/polyhedral/rhombic.js), [Examples](https://observablehq.com/d/881a8431e638b408) -[](https://observablehq.com/d/881a8431e638b408) +[](https://observablehq.com/d/881a8431e638b408) The rhombic dodecahedral projection. -# d3.geoDeltoidalHexecontahedral() · [Source](https://github.com/d3/d3-geo-polygon/blob/main/src/polyhedral/deltoidal.js), [Examples](https://observablehq.com/d/881a8431e638b408) +# d3.geoDeltoidal() · [Source](https://github.com/d3/d3-geo-polygon/blob/main/src/polyhedral/deltoidal.js), [Examples](https://observablehq.com/d/881a8431e638b408) -[](https://observablehq.com/d/881a8431e638b408) +[](https://observablehq.com/d/881a8431e638b408) The deltoidal hexecontahedral projection. diff --git a/src/index.js b/src/index.js index 5584539..05175c1 100644 --- a/src/index.js +++ b/src/index.js @@ -13,7 +13,7 @@ export {default as geoAirocean} from "./airocean.js"; export {default as geoIcosahedral} from "./icosahedral.js"; export {default as geoImago, imagoBlock as geoImagoBlock, imagoRaw as geoImagoRaw} from "./imago.js"; export {default as geoCubic} from "./cubic.js"; -export {default as geoRhombicDodecahedral} from "./rhombic.js"; -export {default as geoDeltoidalHexecontahedral} from "./deltoidal.js"; +export {default as geoRhombic} from "./rhombic.js"; +export {default as geoDeltoidal} from "./deltoidal.js"; export {default as geoCahillKeyes, cahillKeyesRaw as geoCahillKeyesRaw} from "./cahillKeyes.js"; export {default as geoComplexLog, complexLogRaw as geoComplexLogRaw} from "./complexLog.js"; diff --git a/src/rhombic.js b/src/rhombic.js index c61a40b..d260616 100644 --- a/src/rhombic.js +++ b/src/rhombic.js @@ -82,6 +82,7 @@ export default function () { .polygons(polygons) .parents(parents) .angle(20) + .rotate([80, 0, -Math.asin(Math.sqrt(3) / 3) * 90]) .translate([213, 252]) .scale(106.48) } diff --git a/test/snapshots.js b/test/snapshots.js index 57df8ca..c5b28eb 100644 --- a/test/snapshots.js +++ b/test/snapshots.js @@ -8,8 +8,8 @@ import { geoCahillKeyes, geoComplexLog, geoCubic, - geoDeltoidalHexecontahedral, - geoRhombicDodecahedral, + geoDeltoidal, + geoRhombic, geoDodecahedral, geoIcosahedral, geoImago, @@ -100,12 +100,12 @@ export async function polyhedralWaterman() { return renderWorld(geoPolyhedralWaterman().precision(0.1)); } -export async function deltoidalHexecontahedral() { - return renderWorld(geoDeltoidalHexecontahedral().precision(0.1)); +export async function deltoidal() { + return renderWorld(geoDeltoidal().precision(0.1)); } -export async function rhombicDodecahedral() { - return renderWorld(geoRhombicDodecahedral().precision(0.1)); +export async function rhombic() { + return renderWorld(geoRhombic().precision(0.1)); } export async function tetrahedralLee() { @@ -143,3 +143,7 @@ export async function airocean702() { export async function airocean732() { return renderWorld(geoAirocean().rotate([88, -37.8, -73.2])); } + +export async function rhombic00() { + return renderWorld(geoRhombic().rotate([0, 0]).precision(0.1)); +} diff --git a/test/snapshots/deltoidalHexecontahedral.png b/test/snapshots/deltoidal.png similarity index 52% rename from test/snapshots/deltoidalHexecontahedral.png rename to test/snapshots/deltoidal.png index 0e26552..bcd6947 100644 Binary files a/test/snapshots/deltoidalHexecontahedral.png and b/test/snapshots/deltoidal.png differ diff --git a/test/snapshots/rhombic.png b/test/snapshots/rhombic.png new file mode 100644 index 0000000..27fc5f5 Binary files /dev/null and b/test/snapshots/rhombic.png differ diff --git a/test/snapshots/rhombicDodecahedral.png b/test/snapshots/rhombic00.png similarity index 100% rename from test/snapshots/rhombicDodecahedral.png rename to test/snapshots/rhombic00.png