Arc

data class Arc(val center: Vector2, val radius: Double, val angle0: Double, val angle1: Double) : LinearType<Arc> , GeometricPrimitive2D(source)

Represents an arc defined by a center point, a radius, and a range of angles.

This class provides methods to compute the position of a point along the arc and to create a shape contour representation of the arc.

Constructors

Link copied to clipboard
constructor(center: Vector2, radius: Double, angle0: Double, angle1: Double)

Properties

Link copied to clipboard

The starting angle of the arc, in degrees.

Link copied to clipboard

The ending angle of the arc, in degrees.

Link copied to clipboard
val center: Vector2

The center point of the arc.

Link copied to clipboard
val contour: ShapeContour

A computed property that provides a ShapeContour representation of the arc. The contour is constructed by moving to the position at the start of the arc (t=0.0), and then creating a circular arc from that point through an intermediate position (t=0.5) before ending at the final position (t=1.0).

Link copied to clipboard

The radius of the arc.

Functions

Link copied to clipboard
fun conjugate(): Arc
Link copied to clipboard
open operator override fun div(scale: Double): Arc
Link copied to clipboard
open operator override fun minus(right: Arc): Arc
Link copied to clipboard
open operator override fun plus(right: Arc): Arc
Link copied to clipboard
fun position(t: Double): Vector2

Calculates the position of a point along the arc at a specified parameter t. The parameter t interpolates between the starting and ending angles of the arc.

Link copied to clipboard
open operator override fun times(scale: Double): Arc