Handbook
Glossary
perlin-noise ( table: byte-array point: float-4 -- value: float )
Vocabulary
noise
Inputs
table
a
byte-array
point
a
float-4
Outputs
value
a
float
Definition
USING:
combinators
math.vectors
math.vectors.simd
sequences
typed
;
IN:
noise
TYPED::
perlin-noise
( table: byte-array point: float-4 -- value: float )
point
floor-vector
:>
_point_ _point_
unit-cubed
:>
cube
point _point_
v-
:>
gradients gradients
fade
:>
faded table cube
first3
hashes
{
[
gradients
grad
]
[
gradients
float-4{
1.0 0.0 0.0 0.0
}
v-
grad
]
[
gradients
float-4{
0.0 1.0 0.0 0.0
}
v-
grad
]
[
gradients
float-4{
1.0 1.0 0.0 0.0
}
v-
grad
]
[
gradients
float-4{
0.0 0.0 1.0 0.0
}
v-
grad
]
[
gradients
float-4{
1.0 0.0 1.0 0.0
}
v-
grad
]
[
gradients
float-4{
0.0 1.0 1.0 0.0
}
v-
grad
]
[
gradients
float-4{
1.0 1.0 1.0 0.0
}
v-
grad
]
}
spread
faded
trilerp
;