[orx-shapes] Refactor package layout

This commit is contained in:
Edwin Jakobs
2024-01-23 09:38:43 +01:00
parent 78ba51ca85
commit 8fbb106823
54 changed files with 138 additions and 91 deletions

View File

@@ -0,0 +1,26 @@
package alphashape
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.shapes.alphashape.AlphaShape
import org.openrndr.math.Vector2
import kotlin.random.Random
fun main() = application {
program {
val points = List(40) {
Vector2(
Random.nextDouble(width*0.25, width*0.75),
Random.nextDouble(height*0.25, height*0.75)
)
}
val alphaShape = AlphaShape(points)
val c = alphaShape.createContour()
extend {
drawer.fill = ColorRGBa.PINK
drawer.contour(c)
drawer.fill = ColorRGBa.WHITE
drawer.circles(points, 4.0)
}
}
}