Demos: ensure all use fun main() = application {

- Adjust some demo window sizes.
- Replace Random.double by Double.uniform
- Tweak some demos so screenshots look more interesting
This commit is contained in:
Abe Pazos
2025-01-26 20:57:04 +01:00
parent 1975a820fc
commit c8f7dd52c6
116 changed files with 2889 additions and 2942 deletions

View File

@@ -9,20 +9,18 @@ import org.openrndr.extra.turtle.turtle
import org.openrndr.math.Vector2
import kotlin.random.Random
fun main() {
application {
program {
val r = Random(40)
val contours = turtle(drawer.bounds.center + Vector2(-50.0, 50.0)) {
for (i in 0 until 500) {
rotate(Double.uniform(-90.0, 90.0, r))
forward(Double.uniform(10.0, 40.0, r))
}
}
extend {
drawer.stroke = ColorRGBa.PINK
drawer.contours(contours)
fun main() = application {
program {
val r = Random(40)
val contours = turtle(drawer.bounds.center + Vector2(-50.0, 50.0)) {
for (i in 0 until 500) {
rotate(Double.uniform(-90.0, 90.0, r))
forward(Double.uniform(10.0, 40.0, r))
}
}
extend {
drawer.stroke = ColorRGBa.PINK
drawer.contours(contours)
}
}
}
}