-
Notifications
You must be signed in to change notification settings - Fork 37
/
DemoNet01.kt
34 lines (31 loc) · 1011 Bytes
/
DemoNet01.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package primitives
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.shapes.primitives.Net
import org.openrndr.shape.Circle
import kotlin.math.sin
fun main() {
application {
program {
extend {
drawer.clear(ColorRGBa.BLACK)
drawer.stroke = ColorRGBa.WHITE
drawer.fill = ColorRGBa.PINK
val a = drawer.bounds.position(0.7, 0.5)
val b = drawer.bounds.position(0.3, 0.5)
val c = Circle(
drawer.bounds.position(
sin(seconds) * 0.35 + 0.5,
sin(seconds * 2) * 0.25 + 0.5
), 50.0
)
val net = Net(a, b, c)
drawer.circle(a, 10.0)
drawer.circle(b, 10.0)
drawer.circle(c)
drawer.strokeWeight = 2.0
drawer.contour(net.contour)
}
}
}
}