CubicBezier2

  • Returns the minimal bounding region for this cubic Bézier curve.

    Declaration

    Swift

    @inlinable
    public func boundingRegion() -> (minimum: Output, maximum: Output)
  • Returns the result of rotating the points of this Bézier curve by angleInRadians around the origin.

    Declaration

    Swift

    public func rotated(by angleInRadians: Output.Scalar) -> CubicBezier<Output>
  • Declaration

    Swift

    public func aligned(along line: LinearBezier2<Output>) -> CubicBezier<Output>
  • Declaration

    Swift

    public func approximateIntersection(
        with other: Self,
        threshold: Output.Scalar
    ) -> [(Input, Input)]
  • Gets a normal vector for this Bézier curve at a given point.

    Declaration

    Swift

    public func normal(at input: Output.Scalar) -> Output

Available where Output: ConstructibleBezier2PointType

  • Returns the extremas for the x and y axis of this cubic Bézier curve, as two Bézier curves that represent the axis on the Y axis, and ‘t’ as the X axis, ranging from 0 to 1.

    Declaration

    Swift

    public func extremas() -> (x: `Self`, y: `Self`)
  • Returns the roots of this cubic Bézier.

    If one or more of the roots fall outside the range of 0-1, or are not computable, nil is returned in their place, instead.

    In case only one root is valid for each coordinate, the (x/y)0 scalar will be non-nil, while (x/y)1 will be nil.

    Declaration

    Swift

    public func roots() -> (x0: Input?, x1: Input?, y0: Input?, y1: Input?)
  • Returns the result of the intersection of this Bézier curve against a given input line.

    Declaration

    Swift

    public func intersection(with line: LinearBezier<Output>) -> (t0: Input?, t1: Input?, t2: Input?, t3: Input?)