Add 1d noise versions, Gaussian noise, noise gradients, 4D fractal functions

This commit is contained in:
Edwin Jakobs
2020-03-12 12:40:12 +01:00
parent 5b0775289c
commit eff96bac94
13 changed files with 538 additions and 164 deletions

View File

@@ -0,0 +1,33 @@
import org.openrndr.extra.noise.*
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe
import kotlin.test.assertEquals
object TestGradient : Spek({
describe("Noise") {
it("has a gradient") {
gradient(::perlinLinear, 100, 0.1)
}
}
describe("FBM noise func") {
it("has a gradient") {
val func = fbmFunc1D(::perlinLinear)
gradient(func, 100, 0.1)
}
}
describe("Billow noise func") {
it("has a gradient") {
val func = billowFunc1D(::perlinLinear)
gradient(func, 100, 0.1)
}
}
describe("Rigid noise func") {
it("has a gradient") {
val func = rigidFunc1D(::perlinLinear)
gradient(func, 100, 0.1)
}
}
})