[orx-marching-squares] Add demo texts.

This commit is contained in:
Abe Pazos
2025-10-05 16:21:34 +02:00
parent 923e64f37a
commit 3bda443d62
4 changed files with 45 additions and 0 deletions

View File

@@ -5,6 +5,16 @@ import org.openrndr.math.Vector2
import kotlin.math.PI
import kotlin.math.cos
/**
* This Marching Square demonstration shows the effect of wrapping a distance function
* within a cosine (or sine). These mathematical functions return values that periodically
* alternate between negative and positive, creating nested contours as the distance increases.
*
* The `/ 100.0) * 2 * PI` part of the formula is only a scaling factor, more or less
* equivalent to 0.06. Increasing or decreasing this value will change how close the generated
* parallel curves are to each other.
*
*/
fun main() = application {
configure {
width = 720