openrndr / org.openrndr.shape / Circle

Circle

data class Circle (source)

Constructors

<init>

Circle(x: Double, y: Double, radius: Double)
Circle(center: Vector2, radius: Double)

Properties

center

val center: Vector2

contour

creates ShapeContour representation

val contour: ShapeContour

radius

val radius: Double

shape

creates Shape representation

val shape: Shape

Functions

contains

fun contains(point: Vector2): Boolean

div

operator fun div(scale: Double): Circle

minus

operator fun minus(right: Circle): Circle

moved

creates new Circle with center offset by offset

fun moved(offset: Vector2): Circle

movedTo

creates new Circle with center at position

fun movedTo(position: Vector2): Circle

plus

operator fun plus(right: Circle): Circle

scaled

creates new Circle with radius scaled by scale

fun scaled(scale: Double): Circle

scaledTo

creates new Circle with radius set to fitRadius

fun scaledTo(fitRadius: Double): Circle

tangents

calculates the tangent lines between two circles by default it returns the outer tangents

fun tangents(c: Circle, isInner: Boolean = false): List<Pair<Vector2, Vector2>>?

calculates the tangent lines to an external point

fun tangents(point: Vector2): Pair<Vector2, Vector2>

times

operator fun times(scale: Double): Circle

Companion Object Functions

fromPoints

fun fromPoints(a: Vector2, b: Vector2): Circle
fun fromPoints(a: Vector2, b: Vector2, c: Vector2): Circle