Class WorldMapGenerator.EllipticalHammerMap

java.lang.Object
squidpony.squidgrid.mapping.WorldMapGenerator
squidpony.squidgrid.mapping.WorldMapGenerator.EllipticalHammerMap
All Implemented Interfaces:
Serializable
Enclosing class:
WorldMapGenerator

public static class WorldMapGenerator.EllipticalHammerMap
extends WorldMapGenerator
A concrete implementation of WorldMapGenerator that projects the world map onto an ellipse that should be twice as wide as it is tall (although you can stretch it by width and height that don't have that ratio). This uses the Hammer projection, so the latitude lines are curved instead of flat. The Mollweide projection that WorldMapGenerator.EllipticalMap uses has flat lines, but the two projection are otherwise very similar, and are both equal-area (Hammer tends to have less significant distortion around the edges, but the curvature of the latitude lines can be hard to visualize). Preview image link of a world rotating.
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • EllipticalHammerMap

      Constructs a concrete WorldMapGenerator for a map that can be used to display a projection of a globe onto an ellipse without distortion of the sizes of features but with significant distortion of shape. This is very similar to WorldMapGenerator.EllipticalMap, but has curved latitude lines instead of flat ones (it also may see more internal usage because some operations on this projection are much faster and simpler). Always makes a 200x100 map. Uses FastNoise as its noise generator, with 1.0 as the octave multiplier affecting detail. If you were using EllipticalHammerMap(long, int, int, Noise3D, double), then this would be the same as passing the parameters 0x1337BABE1337D00DL, 200, 100, DEFAULT_NOISE, 1.0.
    • EllipticalHammerMap

      public EllipticalHammerMap​(int mapWidth, int mapHeight)
      Constructs a concrete WorldMapGenerator for a map that can be used to display a projection of a globe onto an ellipse without distortion of the sizes of features but with significant distortion of shape. This is very similar to WorldMapGenerator.EllipticalMap, but has curved latitude lines instead of flat ones (it also may see more internal usage because some operations on this projection are much faster and simpler). Takes only the width/height of the map. The initial seed is set to the same large long every time, and it's likely that you would set the seed when you call WorldMapGenerator.generate(long). The width and height of the map cannot be changed after the fact, but you can zoom in. Uses FastNoise as its noise generator, with 1.0 as the octave multiplier affecting detail.
      Parameters:
      mapWidth - the width of the map(s) to generate; cannot be changed later
      mapHeight - the height of the map(s) to generate; cannot be changed later
    • EllipticalHammerMap

      public EllipticalHammerMap​(long initialSeed, int mapWidth, int mapHeight)
      Constructs a concrete WorldMapGenerator for a map that can be used to display a projection of a globe onto an ellipse without distortion of the sizes of features but with significant distortion of shape. This is very similar to WorldMapGenerator.EllipticalMap, but has curved latitude lines instead of flat ones (it also may see more internal usage because some operations on this projection are much faster and simpler). Takes an initial seed and the width/height of the map. The initialSeed parameter may or may not be used, since you can specify the seed to use when you call WorldMapGenerator.generate(long). The width and height of the map cannot be changed after the fact, but you can zoom in. Uses FastNoise as its noise generator, with 1.0 as the octave multiplier affecting detail.
      Parameters:
      initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generate
      mapWidth - the width of the map(s) to generate; cannot be changed later
      mapHeight - the height of the map(s) to generate; cannot be changed later
    • EllipticalHammerMap

      public EllipticalHammerMap​(long initialSeed, int mapWidth, int mapHeight, double octaveMultiplier)
      Constructs a concrete WorldMapGenerator for a map that can be used to display a projection of a globe onto an ellipse without distortion of the sizes of features but with significant distortion of shape. This is very similar to WorldMapGenerator.EllipticalMap, but has curved latitude lines instead of flat ones (it also may see more internal usage because some operations on this projection are much faster and simpler). Takes an initial seed and the width/height of the map. The initialSeed parameter may or may not be used, since you can specify the seed to use when you call WorldMapGenerator.generate(long). The width and height of the map cannot be changed after the fact, but you can zoom in. Uses FastNoise as its noise generator, with the given octave multiplier affecting detail.
      Parameters:
      initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generate
      mapWidth - the width of the map(s) to generate; cannot be changed later
      mapHeight - the height of the map(s) to generate; cannot be changed later
      octaveMultiplier - used to adjust the level of detail, with 0.5 at the bare-minimum detail and 1.0 normal
    • EllipticalHammerMap

      public EllipticalHammerMap​(long initialSeed, int mapWidth, int mapHeight, Noise.Noise3D noiseGenerator)
      Constructs a concrete WorldMapGenerator for a map that can be used to display a projection of a globe onto an ellipse without distortion of the sizes of features but with significant distortion of shape. This is very similar to WorldMapGenerator.EllipticalMap, but has curved latitude lines instead of flat ones (it also may see more internal usage because some operations on this projection are much faster and simpler). Takes an initial seed and the width/height of the map. The initialSeed parameter may or may not be used, since you can specify the seed to use when you call WorldMapGenerator.generate(long). The width and height of the map cannot be changed after the fact, but you can zoom in. Uses the given noise generator, with 1.0 as the octave multiplier affecting detail. The suggested Noise3D implementation to use is FastNoise.instance.
      Parameters:
      initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generate
      mapWidth - the width of the map(s) to generate; cannot be changed later
      mapHeight - the height of the map(s) to generate; cannot be changed later
      noiseGenerator - an instance of a noise generator capable of 3D noise, usually FastNoise
    • EllipticalHammerMap

      public EllipticalHammerMap​(long initialSeed, int mapWidth, int mapHeight, Noise.Noise3D noiseGenerator, double octaveMultiplier)
      Constructs a concrete WorldMapGenerator for a map that can be used to display a projection of a globe onto an ellipse without distortion of the sizes of features but with significant distortion of shape. This is very similar to WorldMapGenerator.EllipticalMap, but has curved latitude lines instead of flat ones (it also may see more internal usage because some operations on this projection are much faster and simpler). Takes an initial seed, the width/height of the map, and parameters for noise generation (a Noise.Noise3D implementation, where FastNoise.instance is suggested, and a multiplier on how many octaves of noise to use, with 1.0 being normal (high) detail and higher multipliers producing even more detailed noise when zoomed-in). The initialSeed parameter may or may not be used, since you can specify the seed to use when you call WorldMapGenerator.generate(long). The width and height of the map cannot be changed after the fact, but you can zoom in. FastNoise will be the fastest 3D generator to use for noiseGenerator, and the seed it's constructed with doesn't matter because this will change the seed several times at different scales of noise (it's fine to use the static FastNoise.instance because it has no changing state between runs of the program). The octaveMultiplier parameter should probably be no lower than 0.5, but can be arbitrarily high if you're willing to spend much more time on generating detail only noticeable at very high zoom; normally 1.0 is fine and may even be too high for maps that don't require zooming.
      Parameters:
      initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generate
      mapWidth - the width of the map(s) to generate; cannot be changed later
      mapHeight - the height of the map(s) to generate; cannot be changed later
      noiseGenerator - an instance of a noise generator capable of 3D noise, usually FastNoise
      octaveMultiplier - used to adjust the level of detail, with 0.5 at the bare-minimum detail and 1.0 normal
    • EllipticalHammerMap

      Copies the EllipticalHammerMap other to construct a new one that is exactly the same. References will only be shared to Noise classes.
      Parameters:
      other - an EllipticalHammerMap to copy
  • Method Details