[orx-shapes] Add Hobby curves (#200)

This commit is contained in:
Steven van den Broek
2021-10-13 16:16:28 +02:00
committed by GitHub
parent ec70511f2f
commit 8808e62431
2 changed files with 163 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.shapes.hobbyCurve
import org.openrndr.math.Vector2
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))
drawer.stroke = ColorRGBa.BLACK
drawer.fill = ColorRGBa.PINK
drawer.contour(hobbyCurve(points, closed=true))
}
}
}