Fix demos
This commit is contained in:
@@ -59,6 +59,8 @@ kotlin {
|
||||
implementation(project(":orx-camera"))
|
||||
implementation(project(":orx-color"))
|
||||
implementation(project(":orx-triangulation"))
|
||||
implementation(project(":orx-shapes"))
|
||||
implementation(project(":orx-noise"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,3 +78,13 @@ Edwin Jakobs / [@edwinRNDR](https://github.com/edwinRNDR)
|
||||
[source code](src/demo/kotlin/DemoVoronoi01.kt)
|
||||
|
||||

|
||||
|
||||
### DemoVoronoi02
|
||||
[source code](src/demo/kotlin/DemoVoronoi02.kt)
|
||||
|
||||

|
||||
|
||||
### DemoVoronoi03
|
||||
[source code](src/demo/kotlin/DemoVoronoi03.kt)
|
||||
|
||||

|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user