[orx-noise] Tidy up demos

Produce 720px wide images.
Use main() = application { for reduced indentation
This commit is contained in:
Abe Pazos
2025-01-24 21:47:44 +01:00
parent a1b4070b51
commit c85144c6fe
23 changed files with 347 additions and 347 deletions

View File

@@ -6,22 +6,25 @@ import org.openrndr.extra.noise.simplex
import org.openrndr.math.Vector3
import kotlin.math.absoluteValue
fun main() {
application {
program {
val cb = colorBuffer(width, height)
val shad = cb.shadow
extend {
for (y in 0 until height) {
for (x in 0 until width) {
val p = gradientPerturbFractal(300, frequency = 0.8, position = Vector3(x/320.0,y/240.0, seconds))
val d = simplex(300, p.x, p.y, p.z).absoluteValue
shad[x, y] = ColorRGBa(d, d, d, 1.0)
}
fun main() = application {
configure {
width = 720
height = 360
}
program {
val cb = colorBuffer(width, height)
val shad = cb.shadow
extend {
for (y in 0 until height) {
for (x in 0 until width) {
val p =
gradientPerturbFractal(300, frequency = 0.8, position = Vector3(x / 320.0, y / 240.0, seconds))
val d = simplex(300, p.x, p.y, p.z).absoluteValue
shad[x, y] = ColorRGBa(d, d, d, 1.0)
}
shad.upload()
drawer.image(cb)
}
shad.upload()
drawer.image(cb)
}
}
}
}