[orx-shapes] Add demo descriptions

This commit is contained in:
Abe Pazos
2025-10-29 09:52:31 +01:00
parent c3bb7d415f
commit 8990a6cf64
11 changed files with 99 additions and 0 deletions

View File

@@ -6,6 +6,17 @@ import org.openrndr.extra.noise.uniform
import org.openrndr.extra.shapes.ordering.hilbertOrder
import kotlin.random.Random
/**
* Demonstrates the use of the `hilbertOrder` method to sort 2D points in a list of random points.
*
* When drawing the sorted points as a line strip, this line crosses itself fewer times than if the
* points were drawn in a random order (sometimes zero crossings, depending on the number and layout of the points).
*
* The Hilbert curve (also known as the Hilbert space-filling curve) is a continuous fractal
* space-filling curve first described by the German mathematician David Hilbert in 1891
* https://en.wikipedia.org/wiki/Hilbert_curve
*
*/
fun main() = application {
configure {
width = 720