Fix demos

This commit is contained in:
Edwin Jakobs
2021-10-21 21:05:17 +02:00
parent 1a4952ef09
commit 9921857007
9 changed files with 28 additions and 28 deletions

View File

@@ -1,18 +1,19 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.noise.poissonDiskSampling
import org.openrndr.math.Vector2
import org.openrndr.math.mod_
import org.openrndr.shape.Circle
import org.openrndr.extra.noise.scatter
import org.openrndr.shape.Ellipse
import kotlin.math.cos
import kotlin.random.Random
fun main() {
application {
program {
extend {
val shape = Ellipse(Vector2(width/2.0, height/2.0), 200.0, 150.0 + cos(seconds)*125.0).shape
val points = shape.poissonDiskSampling(10.0)
val points = shape.scatter(20.0, random = Random(0))
drawer.clear(ColorRGBa.BLACK)
drawer.stroke = null
drawer.fill = ColorRGBa.PINK