[orx-shade-styles] Write comments on demos

This commit is contained in:
Abe Pazos
2025-09-20 19:07:38 +02:00
parent ec9ec947a6
commit ec4032c452
29 changed files with 298 additions and 61 deletions

View File

@@ -5,13 +5,24 @@ import org.openrndr.color.ColorRGBa
import org.openrndr.extra.shapes.hobbycurve.hobbyCurve
import org.openrndr.math.Vector2
/**
* Demonstrates how to use the hobbyCurve function to render a smooth closed contour
* passing through a predefined set of points.
*/
fun main() = application {
program {
extend {
val points = listOf(Vector2(150.0, 350.0), Vector2(325.0, 100.0), Vector2(500.0, 350.0), Vector2(325.0, 250.0))
val points = listOf(
Vector2(150.0, 350.0),
Vector2(325.0, 100.0),
Vector2(500.0, 350.0),
Vector2(325.0, 250.0)
)
drawer.stroke = ColorRGBa.BLACK
drawer.fill = ColorRGBa.PINK
drawer.contour(hobbyCurve(points, closed=true))
drawer.contour(hobbyCurve(points, closed = true))
drawer.fill = ColorRGBa.WHITE
drawer.circles(points, 4.0)
}