Convert orx-shader-phrases and orx-noise to MPP

This commit is contained in:
Edwin Jakobs
2021-06-24 13:31:27 +02:00
parent 6a45db4491
commit 1cf5c825d6
69 changed files with 813 additions and 741 deletions

View File

@@ -0,0 +1,18 @@
package org.openrndr.extra.noise
fun hermite(t: Double): Double {
return t * t * (3 - 2 * t)
}
fun quintic(t: Double): Double {
return t * t * t * (t * (t * 6 - 15) + 10)
}
fun cubic(a: Double, b: Double, c: Double, d: Double, t: Double): Double {
val p = d - c - (a - b)
return t * t * t * p + t * t * (a - b - p) + t * (c - a) + b
}
fun linear(x: Double): Double {
return x
}