opensimplex

An OpenSimplex noise generator in Java.

License

License

GroupId

GroupId

com.raylabz
ArtifactId

ArtifactId

opensimplex
Last Version

Last Version

1.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

opensimplex
An OpenSimplex noise generator in Java.
Project URL

Project URL

http://maven.apache.org
Source Code Management

Source Code Management

http://github.com/RayLabz/OpenSimplexNoiseGenerator/tree/master

Download opensimplex

How to add to project

<!-- https://jarcasting.com/artifacts/com.raylabz/opensimplex/ -->
<dependency>
    <groupId>com.raylabz</groupId>
    <artifactId>opensimplex</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.raylabz/opensimplex/
implementation 'com.raylabz:opensimplex:1.0.3'
// https://jarcasting.com/artifacts/com.raylabz/opensimplex/
implementation ("com.raylabz:opensimplex:1.0.3")
'com.raylabz:opensimplex:jar:1.0.3'
<dependency org="com.raylabz" name="opensimplex" rev="1.0.3">
  <artifact name="opensimplex" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.raylabz', module='opensimplex', version='1.0.3')
)
libraryDependencies += "com.raylabz" % "opensimplex" % "1.0.3"
[com.raylabz/opensimplex "1.0.3"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 3.8.1

Project Modules

There are no modules declared in this project.

Open Simplex Noise Generator

An OpenSimplex noise generation library in Java which supports 2D, 3D, and 4D OpenSimplex noise generation. For use in Java 8+ environments.

Import using Maven:

<dependency>
    <groupId>com.raylabz</groupId>
    <artifactId>opensimplex</artifactId>
    <version>1.0.3/version>
</dependency>

or

com.raylabz:opensimplex:1.0.3

Download jar:

Download


Updates in v1.0.3:

  • Added Range class to model the range of the generated values.
  • Added RangedValue class to model generated values in a specified range.
  • RangedValue objects can now be easily shifted to a different range using the getValue(Range range) method.
  • The generator's methods now return:
    • eval() returns RangedValue.
    • getNoise2D() returns RangedValue.
    • getNoise3D() returns RangedValue.
    • getNoise4D() returns RangedValue.
    • getNoise2DArray() returns RangedValue[].
  • To retrieve the original generated value (in the original range of -1 to 1) of a RangedValue use getValue() without specifying a range.

Usage

Create generator with random seed:

OpenSimplexNoise noise = new OpenSimplexNoise();

Create generator with specified seed:

long seed = 123;
OpenSimplexNoise noise = new OpenSimplexNoise(seed);

Generate a value for position (0,0):

RangedValue value = noise.getNoise2D(0, 0);

Get double value from RangedValue:

double originalValue = value.getValue();

Shift value from original range to a new range (-255, 255):

double shiftedValue = value.getValue(new Range(-255, 255));

Generate an 2D array of values for positions (0,0) to (2500, 2500):

final RangedValue[][] noise2DArray = noise.getNoise2DArray(0, 0, 2500, 2500);
com.raylabz

RayLabz

RayLabz develops apps and software systems running on public clouds.

Versions

Version
1.0.3
1.0.2
1.0.1
1.0.0