Package net.paulhertz.pixelaudio
Class ScaledSimplex
java.lang.Object
net.paulhertz.pixelaudio.ScaledSimplex
-
Constructor Summary
ConstructorsConstructorDescriptionScaledSimplex
(int seed) ScaledSimplex
(int octaves, float detail) ScaledSimplex
(int octaves, float detail, float inc) ScaledSimplex
(int octaves, float detail, float inc, int seed) ScaledSimplex
(int octaves, float detail, int seed) -
Method Summary
Modifier and TypeMethodDescriptionfloat
float
getInc()
float
getNoiz()
int
int
getSeed()
float
noise2
(float x, float y) float
noise2
(float x, float y, float low, float high) float
noise2
(int iter, float x, float y, float det, float scale, float low, float high) float
noise3
(float x, float y, float z) float
noise3
(float x, float y, float z, float low, float high) float
noise3
(int iter, float x, float y, float z, float det, float scale, float low, float high) void
setDetail
(float detail) void
setInc
(float inc) void
setNoiz
(float noiz) void
setOctaves
(int octaves) void
setSeed
(int newSeed)
-
Constructor Details
-
ScaledSimplex
public ScaledSimplex() -
ScaledSimplex
public ScaledSimplex(int seed) -
ScaledSimplex
public ScaledSimplex(int octaves, float detail) -
ScaledSimplex
public ScaledSimplex(int octaves, float detail, int seed) -
ScaledSimplex
public ScaledSimplex(int octaves, float detail, float inc) -
ScaledSimplex
public ScaledSimplex(int octaves, float detail, float inc, int seed)
-
-
Method Details
-
getSeed
public int getSeed() -
setSeed
public void setSeed(int newSeed) -
getOctaves
public int getOctaves() -
setOctaves
public void setOctaves(int octaves) -
getDetail
public float getDetail() -
setDetail
public void setDetail(float detail) -
getInc
public float getInc() -
setInc
public void setInc(float inc) -
getNoiz
public float getNoiz() -
setNoiz
public void setNoiz(float noiz) -
noise2
public float noise2(int iter, float x, float y, float det, float scale, float low, float high) - Parameters:
iter
- number of iterations of scaled noise (same as "octaves")x
- x-coordinatey
- y-coordinatedet
- amount of detail retained from each scaled iteration, aka "persistence"scale
- the effective distance between coordinate points, referred to as "inc" in our codelow
- lower bound, typically for a pixel valuehigh
- upper bound, typically for a pixel value- Returns:
- "noiz" the noise value at (x, y, z)
-
noise2
public float noise2(float x, float y) -
noise2
public float noise2(float x, float y, float low, float high) -
noise3
public float noise3(int iter, float x, float y, float z, float det, float scale, float low, float high) - Parameters:
iter
- number of iterations of scaled noise (same as "octaves")x
- x-coordinatey
- y-coordinatez
- z-coordinate, incrementing z drives the animation over a 2D bitmap in x and ydet
- amount of detail retained from each scaled iteration, aka "persistence"scale
- the effective distance between coordinate points, referred to as "inc" in our codelow
- lower bound, typically for a pixel valuehigh
- upper bound, typically for a pixel value- Returns:
- "noiz" the noise value at (x, y, z)
-
noise3
public float noise3(float x, float y, float z) -
noise3
public float noise3(float x, float y, float z, float low, float high)
-