Fix demos

This commit is contained in:
Edwin Jakobs
2022-10-21 11:56:55 +02:00
parent 1f16aa6a31
commit 99bd0514b4
3 changed files with 17 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.noise.poissonDiskSampling
import org.openrndr.extra.noise.scatter
import org.openrndr.extra.triangulation.delaunayTriangulation
import org.openrndr.math.Vector2
import org.openrndr.shape.Rectangle
@@ -13,11 +14,11 @@ fun main() {
}
program {
val frame = Rectangle.fromCenter(Vector2(400.0), 600.0, 600.0)
val points = poissonDiskSampling(frame, 50.0).map { it + frame.corner }
val points = frame.scatter(50.0)
val delaunay = points.delaunayTriangulation()
val halfedges = delaunay.halfedges()
val hull = delaunay.hull()
//val hull = delaunay.hull()
extend {
drawer.clear(ColorRGBa.BLACK)
@@ -26,8 +27,8 @@ fun main() {
drawer.stroke = ColorRGBa.PINK
drawer.contours(halfedges)
drawer.stroke = ColorRGBa.GREEN
drawer.contour(hull)
//drawer.stroke = ColorRGBa.GREEN
//drawer.contour(hull)
}
}
}