Skip to content

Commit 454703c

Browse files
committed
correct documentation links
1 parent 41189d2 commit 454703c

10 files changed

+135
-135
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
[![License](https://img.shields.io/badge/license-GPL3-ff3079.svg)](https://github.com/kelvin13/noise/blob/master/COPYING)
99
[![Queen](https://img.shields.io/badge/taylor-swift-e030ff.svg)](https://www.google.com/search?q=where+is+ts6&oq=where+is+ts6)
1010

11-
![](tests/banner_FBM.png)
11+
![](doc/1.0.0/png/banner_FBM.png)
1212

1313
**Noise** is a free, pure Swift procedural noise generation library. It is free of Foundation or any other Apple framework, and has no dependencies. All popular types of procedural noise are supported, including three [gradient noises](https://en.wikipedia.org/wiki/Perlin_noise) (often called Perlin or simplex noises), and two [cellular noises](https://en.wikipedia.org/wiki/Worley_noise) (sometimes called Worley or Voronoi noises). *Noise* includes a [fractal brownian motion](https://thebookofshaders.com/13/) (FBM) noise composition framework, and a [disk point sampler](https://en.wikipedia.org/wiki/Supersampling#Poisson_disc) (often called a Poisson sampler), for generating visually even point distributions in the plane. *Noise* also includes pseudo-random number generation and hashing tools.
1414

15-
***Noise*’s entire public API is [documented](https://github.com/kelvin13/noise/wiki).**
15+
***Noise*’s entire public API is [documented](doc/1.0.0).**
1616

1717
## Building
1818

doc/1.0.0/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
###### Module
2-
# Noise
1+
###### Module
2+
# Noise
33

44
Generate and combine commonly used procedural noise patterns and distributions.
55

6-
*This wiki documents features present in* [Noise *1.0.0*](https://github.com/kelvin13/noise/releases/tag/1.0.0). *Many new features are currently being added to* [`master`](https://github.com/kelvin13/noise/tree/master) *for* Noise *2.0.0, and several types and methods will be deprecated or removed for 2.0.0, including* [`SimplexNoise2D`](struct-SimplexNoise2D).
6+
*This wiki documents features present in* [Noise *1.0.0*](https://github.com/kelvin13/noise/releases/tag/1.0.0). *Many new features are currently being added to* [`master`](https://github.com/kelvin13/noise/tree/master) *for* Noise *2.0.0, and several types and methods will be deprecated or removed for 2.0.0, including* [`SimplexNoise2D`](struct-SimplexNoise2D.md).
77
***
88

9-
## Symbols
9+
## Symbols
1010

11-
### Protocols
11+
### Protocols
1212

13-
#### `protocol` [`Noise`](protocol-Noise)
13+
#### `protocol` [`Noise`](protocol-Noise.md)
1414
> A procedural noise generator.
1515
16-
### Structures
16+
### Structures
1717

18-
#### `struct` [`SimplexNoise2D`](struct-SimplexNoise2D)
18+
#### `struct` [`SimplexNoise2D`](struct-SimplexNoise2D.md)
1919
> A type of two-dimensional gradient noise (sometimes called [Perlin noise](https://en.wikipedia.org/wiki/Perlin_noise)), suitable for texturing two-dimensional planes. Simplex noise is supported in the library mainly because it has historical significance; it has since been superseded by the less popular, but more powerful and more efficient super-simplex noise.
2020
21-
#### `struct` [`SuperSimplexNoise2D`](struct-SuperSimplexNoise2D)
22-
> A type of two-dimensional gradient noise (sometimes called [Perlin noise](https://en.wikipedia.org/wiki/Perlin_noise)), suitable for texturing two-dimensional planes. Super-simplex noise is an improved version of simplex noise which runs faster and scales better to higher dimensions.
21+
#### `struct` [`SuperSimplexNoise2D`](struct-SuperSimplexNoise2D.md)
22+
> A type of two-dimensional gradient noise (sometimes called [Perlin noise](https://en.wikipedia.org/wiki/Perlin_noise)), suitable for texturing two-dimensional planes. Super-simplex noise is an improved version of simplex noise which runs faster and scales better to higher dimensions.
2323
2424

25-
#### `struct` [`SuperSimplexNoise3D`](struct-SuperSimplexNoise3D)
25+
#### `struct` [`SuperSimplexNoise3D`](struct-SuperSimplexNoise3D.md)
2626
> A type of three-dimensional gradient noise (sometimes called [Perlin noise](https://en.wikipedia.org/wiki/Perlin_noise)), suitable for texturing arbitrary three-dimensional objects.
2727
28-
#### `struct` [`CellNoise2D`](struct-CellNoise2D)
28+
#### `struct` [`CellNoise2D`](struct-CellNoise2D.md)
2929
> A type of two-dimensional cellular noise (sometimes called [Worley noise](https://en.wikipedia.org/wiki/Worley_noise), or Voronoi noise), suitable for texturing two-dimensional planes.
3030
31-
#### `struct` [`CellNoise3D`](struct-CellNoise3D)
31+
#### `struct` [`CellNoise3D`](struct-CellNoise3D.md)
3232
> A type of three-dimensional cellular noise (sometimes called [Worley noise](https://en.wikipedia.org/wiki/Worley_noise), or Voronoi noise), suitable for texturing arbitrary three-dimensional objects.
3333
34-
#### `struct` [`DiskSampler2D`](struct-DiskSampler2D)
34+
#### `struct` [`DiskSampler2D`](struct-DiskSampler2D.md)
3535
> A point sampler capable of producing uniform and roughly-evenly spaced pseudo-random point distributions in the plane. Disk sampling is sometimes referred to as [Poisson sampling](https://en.wikipedia.org/wiki/Supersampling#Poisson_disc).
3636
37-
#### `struct` [`FBM`](struct-FBM)
38-
> A generic [fractal brownian motion](https://thebookofshaders.com/13/) noise generator, capable of overlaying multiple instances of procedural [noise](protocol-Noise) at increasing frequencies.
37+
#### `struct` [`FBM`](struct-FBM.md)
38+
> A generic [fractal brownian motion](https://thebookofshaders.com/13/) noise generator, capable of overlaying multiple instances of procedural [noise](protocol-Noise.md) at increasing frequencies.
3939
40-
#### `struct` [`PermutationTable`](struct-PermutationTable)
40+
#### `struct` [`PermutationTable`](struct-PermutationTable.md)
4141
> An 8-bit permutation table useful for generating pseudo-random hash values.
4242
43-
#### `struct` [`RandomXorshift`](struct-RandomXorshift)
44-
> A cryptographically unsecure 128-bit [Xorshift](https://en.wikipedia.org/wiki/Xorshift) pseudo-random number generator.
43+
#### `struct` [`RandomXorshift`](struct-RandomXorshift.md)
44+
> A cryptographically unsecure 128-bit [Xorshift](https://en.wikipedia.org/wiki/Xorshift) pseudo-random number generator.

doc/1.0.0/struct-CellNoise2D.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
###### Structure
1+
###### Structure
22

33
# `CellNoise2D`
44
A type of two-dimensional cellular noise (sometimes called [Worley noise](https://en.wikipedia.org/wiki/Worley_noise), or Voronoi noise), suitable for texturing two-dimensional planes.
55

66
Unlike many other cell noise implementations, *Noise*’s implementation samples all relevant generating-points, preventing artifacts or discontinuities from ever appearing in the noise. Accordingly, *Noise*’s implementation is heavily optimized to prevent the additional edge cases from impacting the performance of the cell noise.
77

8-
Cell noise has a three-dimensional version, [`CellNoise3D`](struct-CellNoise3D).
8+
Cell noise has a three-dimensional version, [`CellNoise3D`](struct-CellNoise3D.md).
99

1010
![](png/banner_cell2d.png)
11-
***
11+
***
1212

13-
## Symbols
13+
## Symbols
1414

1515
### Initializers
1616

17-
#### [`init`](protocol-Noise#initamplitudedouble-frequencydouble-seedint)`(amplitude:Double, frequency:Double, seed:Int = 0)`
17+
#### [`init`](protocol-Noise.md#initamplitudedouble-frequencydouble-seedint)`(amplitude:Double, frequency:Double, seed:Int = 0)`
1818
> Creates an instance with the given `amplitude`, `frequency`, and random `seed` values. Creating an instance generates a new pseudo-random permutation table for that instance, and a new instance does not need to be regenerated to sample the same procedural noise field.
1919
2020
> The given amplitude is adjusted internally to produce output *exactly* within the range of `0 ... amplitude`. However, in practice the cell noise rarely reaches the maximum threshold, as it is often useful to inflate the amplitude to get the desired appearance.
2121
22-
### Instance methods
22+
### Instance methods
2323

2424
#### `func` `closest_point(_ x:Double, _ y:Double) -> (point:(Int, Int), r2:Double)`
2525
> Returns the index numbers of the closest feature point to the given coordinate, and the squared distance from the given coordinate to the feature point. These index numbers can be fed to a color hashing function to produce a [Voronoi diagram](https://en.wikipedia.org/wiki/Voronoi_diagram).
2626
27-
#### `func` [`evaluate`](protocol-Noise#func-evaluate_-xdouble-_-ydouble---double)`(_ x:Double, _ y:Double) -> Double`
27+
#### `func` [`evaluate`](protocol-Noise.md#func-evaluate_-xdouble-_-ydouble---double)`(_ x:Double, _ y:Double) -> Double`
2828
> Evaluates the cell noise field at the given coordinates.
2929
30-
#### `func` [`evaluate`](protocol-Noise#func-evaluate_-xdouble-_-ydouble-_-zdouble---double)`(_ x:Double, _ y:Double, _:Double) -> Double`
30+
#### `func` [`evaluate`](protocol-Noise.md#func-evaluate_-xdouble-_-ydouble-_-zdouble---double)`(_ x:Double, _ y:Double, _:Double) -> Double`
3131
> Evaluates the cell noise field at the given coordinates. The third coordinate is ignored.
3232
33-
#### `func` [`evaluate`](protocol-Noise#func-evaluate_-xdouble-_-ydouble-_-zdouble-_-wdouble---double)`(_ x:Double, _ y:Double, _:Double, _:Double) -> Double`
33+
#### `func` [`evaluate`](protocol-Noise.md#func-evaluate_-xdouble-_-ydouble-_-zdouble-_-wdouble---double)`(_ x:Double, _ y:Double, _:Double, _:Double) -> Double`
3434
> Evaluates the cell noise field at the given coordinates. The third and fourth coordinates are ignored.
3535
36-
#### `func` [`sample_area`](protocol-Noise#func-sample_areawidthint-heightint---double-double-double)`(width:Int, height:Int) -> [(Double, Double, Double)]`
36+
#### `func` [`sample_area`](protocol-Noise.md#func-sample_areawidthint-heightint---double-double-double)`(width:Int, height:Int) -> [(Double, Double, Double)]`
3737
> Evaluates the noise field over the given area, starting from the origin, and extending over the first quadrant, taking unit steps in both directions. Although the `x` and `y` coordinates are returned, the output vector is guaranteed to be in row-major order.
3838
39-
#### `func` [`sample_area_saturated_to_u8`](protocol-Noise#func-sample_area_saturated_to_u8widthint-heightint-offsetdouble--05---uint8)`(width:Int, height:Int, offset:Double = 0.5) -> [UInt8]`
39+
#### `func` [`sample_area_saturated_to_u8`](protocol-Noise.md#func-sample_area_saturated_to_u8widthint-heightint-offsetdouble--05---uint8)`(width:Int, height:Int, offset:Double = 0.5) -> [UInt8]`
4040
> Evaluates the noise field over the given area, starting from the origin, and extending over the first quadrant, storing the values in a row-major array of samples. The samples are clamped, but not scaled, to the range `0 ... 255`.
4141
42-
#### `func` [`sample_volume`](protocol-Noise#func-sample_volumewidthint-heightint-depthint---double-double-double-double)`(width:Int, height:Int, depth:Int) -> [(Double, Double, Double, Double)]`
42+
#### `func` [`sample_volume`](protocol-Noise.md#func-sample_volumewidthint-heightint-depthint---double-double-double-double)`(width:Int, height:Int, depth:Int) -> [(Double, Double, Double, Double)]`
4343
> Evaluates the noise field over the given volume, starting from the origin, and extending over the first octant, taking unit steps in all three directions. Although the `x`, `y`, and `z` coordinates are returned, the output vector is guaranteed to be in `xy`-plane-major, and then row-major order.
4444
45-
#### `func` [`sample_volume_saturated_to_u8`](protocol-Noise#func-sample_volume_saturated_to_u8widthint-heightint-depthint-offsetdouble--05---uint8)`(width:Int, height:Int, depth:Int, offset:Double = 0.5) -> [UInt8]`
45+
#### `func` [`sample_volume_saturated_to_u8`](protocol-Noise.md#func-sample_volume_saturated_to_u8widthint-heightint-depthint-offsetdouble--05---uint8)`(width:Int, height:Int, depth:Int, offset:Double = 0.5) -> [UInt8]`
4646
> Evaluates the noise field over the given volume, starting from the origin, and extending over the first octant, storing the values in a `xy`-plane-major, and then row-major order array of samples. The samples are clamped, but not scaled, to the range `0 ... 255`.
4747
48-
## Relationships
48+
## Relationships
4949

5050
### Conforms to
5151

52-
#### [`Noise`](protocol-Noise)
52+
#### [`Noise`](protocol-Noise.md)

doc/1.0.0/struct-CellNoise3D.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
###### Structure
1+
###### Structure
22

33
# `CellNoise3D`
44
A type of three-dimensional cellular noise (sometimes called [Worley noise](https://en.wikipedia.org/wiki/Worley_noise), or Voronoi noise), suitable for texturing arbitrary three-dimensional objects.
55

66
Unlike many other cell noise implementations, *Noise*’s implementation samples all relevant generating-points, preventing artifacts or discontinuities from ever appearing in the noise. Accordingly, *Noise*’s implementation is heavily optimized to prevent the additional edge cases from impacting the performance of the cell noise.
77

8-
Three dimensional cell noise is approximately three to four times slower than its [two-dimensional version](struct-CellNoise2D), but has a vastly superior visual appearance, even when sampled in two dimensions.
8+
Three dimensional cell noise is approximately three to four times slower than its [two-dimensional version](struct-CellNoise2D.md), but has a vastly superior visual appearance, even when sampled in two dimensions.
99

1010
`CellNoise3D` is analogous to [Blender Voronoi noise](https://docs.blender.org/manual/en/dev/render/cycles/nodes/types/textures/voronoi.html), with the *Distance Squared* metric. The *Scale* of Blender Voronoi noise is identical to the `frequency` of `CellNoise3D`; its range is approximately `0 ... 10/3` in `CellNoise3D` units.
1111

12-
![](https://github.com/kelvin13/noise/blob/master/tests/banner_cell3d.png)
13-
***
12+
![](png/banner_cell3d.png)
13+
***
1414

15-
## Symbols
15+
## Symbols
1616

1717
### Initializers
1818

19-
#### [`init`](protocol-Noise#initamplitudedouble-frequencydouble-seedint)`(amplitude:Double, frequency:Double, seed:Int = 0)`
19+
#### [`init`](protocol-Noise.md#initamplitudedouble-frequencydouble-seedint)`(amplitude:Double, frequency:Double, seed:Int = 0)`
2020
> Creates an instance with the given `amplitude`, `frequency`, and random `seed` values. Creating an instance generates a new pseudo-random permutation table for that instance, and a new instance does not need to be regenerated to sample the same procedural noise field.
2121
2222
> The given amplitude is adjusted internally to produce output *exactly* within the range of `0 ... amplitude`. However, in practice the cell noise rarely reaches the maximum threshold, as it is often useful to inflate the amplitude to get the desired appearance.
2323
24-
### Instance methods
24+
### Instance methods
2525

2626
#### `func` `closest_point(_ x:Double, _ y:Double, _ z:Double) -> (point:(Int, Int, Int), r2:Double)`
2727
> Returns the index numbers of the closest feature point to the given coordinate, and the squared distance from the given coordinate to the feature point. These index numbers can be fed to a color hashing function to produce a [Voronoi diagram](https://en.wikipedia.org/wiki/Voronoi_diagram).
2828
29-
#### `func` [`evaluate`](protocol-Noise#func-evaluate_-xdouble-_-ydouble---double)`(_ x:Double, _ y:Double) -> Double`
29+
#### `func` [`evaluate`](protocol-Noise.md#func-evaluate_-xdouble-_-ydouble---double)`(_ x:Double, _ y:Double) -> Double`
3030
> Evaluates the cell noise field at the given `x, y` coordinates, supplying `0` for the missing `z` coordinate.
3131
32-
#### `func` [`evaluate`](protocol-Noise#func-evaluate_-xdouble-_-ydouble-_-zdouble---double)`(_ x:Double, _ y:Double, _ z:Double) -> Double`
32+
#### `func` [`evaluate`](protocol-Noise.md#func-evaluate_-xdouble-_-ydouble-_-zdouble---double)`(_ x:Double, _ y:Double, _ z:Double) -> Double`
3333
> Evaluates the cell noise field at the given coordinates.
3434
35-
#### `func` [`evaluate`](protocol-Noise#func-evaluate_-xdouble-_-ydouble-_-zdouble-_-wdouble---double)`(_ x:Double, _ y:Double, _ z:Double, _:Double) -> Double`
35+
#### `func` [`evaluate`](protocol-Noise.md#func-evaluate_-xdouble-_-ydouble-_-zdouble-_-wdouble---double)`(_ x:Double, _ y:Double, _ z:Double, _:Double) -> Double`
3636
> Evaluates the cell noise field at the given coordinates. The fourth coordinate is ignored.
3737
38-
#### `func` [`sample_area`](protocol-Noise#func-sample_areawidthint-heightint---double-double-double)`(width:Int, height:Int) -> [(Double, Double, Double)]`
38+
#### `func` [`sample_area`](protocol-Noise.md#func-sample_areawidthint-heightint---double-double-double)`(width:Int, height:Int) -> [(Double, Double, Double)]`
3939
> Evaluates the noise field over the given area, starting from the origin, and extending over the first quadrant, taking unit steps in both directions. Although the `x` and `y` coordinates are returned, the output vector is guaranteed to be in row-major order.
4040
41-
#### `func` [`sample_area_saturated_to_u8`](protocol-Noise#func-sample_area_saturated_to_u8widthint-heightint-offsetdouble--05---uint8)`(width:Int, height:Int, offset:Double = 0.5) -> [UInt8]`
41+
#### `func` [`sample_area_saturated_to_u8`](protocol-Noise.md#func-sample_area_saturated_to_u8widthint-heightint-offsetdouble--05---uint8)`(width:Int, height:Int, offset:Double = 0.5) -> [UInt8]`
4242
> Evaluates the noise field over the given area, starting from the origin, and extending over the first quadrant, storing the values in a row-major array of samples. The samples are clamped, but not scaled, to the range `0 ... 255`.
4343
44-
#### `func` [`sample_volume`](protocol-Noise#func-sample_volumewidthint-heightint-depthint---double-double-double-double)`(width:Int, height:Int, depth:Int) -> [(Double, Double, Double, Double)]`
44+
#### `func` [`sample_volume`](protocol-Noise.md#func-sample_volumewidthint-heightint-depthint---double-double-double-double)`(width:Int, height:Int, depth:Int) -> [(Double, Double, Double, Double)]`
4545
> Evaluates the noise field over the given volume, starting from the origin, and extending over the first octant, taking unit steps in all three directions. Although the `x`, `y`, and `z` coordinates are returned, the output vector is guaranteed to be in `xy`-plane-major, and then row-major order.
4646
47-
#### `func` [`sample_volume_saturated_to_u8`](protocol-Noise#func-sample_volume_saturated_to_u8widthint-heightint-depthint-offsetdouble--05---uint8)`(width:Int, height:Int, depth:Int, offset:Double = 0.5) -> [UInt8]`
47+
#### `func` [`sample_volume_saturated_to_u8`](protocol-Noise.md#func-sample_volume_saturated_to_u8widthint-heightint-depthint-offsetdouble--05---uint8)`(width:Int, height:Int, depth:Int, offset:Double = 0.5) -> [UInt8]`
4848
> Evaluates the noise field over the given volume, starting from the origin, and extending over the first octant, storing the values in a `xy`-plane-major, and then row-major order array of samples. The samples are clamped, but not scaled, to the range `0 ... 255`.
4949
50-
## Relationships
50+
## Relationships
5151

5252
### Conforms to
5353

54-
#### [`Noise`](protocol-Noise)
54+
#### [`Noise`](protocol-Noise.md)

0 commit comments

Comments
 (0)