mix

fun RectifiedContour.mix(other: RectifiedContour, blendFunction: (Double) -> Double): ShapeContour(source)

Blends two rectified contours by applying a blend function to their segments.

This method takes two RectifiedContour instances and a blend function to produce a ShapeContour that smoothly interpolates between the two contours. The blending is performed by applying the blend function at specific parameter values for each segment of the contours.

Return

a ShapeContour that is the result of blending this contour with the other contour using the provided blend function

Parameters

other

the other RectifiedContour to blend with

blendFunction

a function determining the blend factor for the segments as a function of rectified parameter space


fun RectifiedPath3D.mix(other: RectifiedPath3D, blendFunction: (Double) -> Double): Path3D(source)

Produces a blended 3D path by mixing two rectified paths using a custom blending function.

This function combines segments from the current RectifiedPath3D instance with segments from another specified RectifiedPath3D instance. Each segment is blended based on a provided blending function that accepts a normalized parameter and returns a blend weight. The resultant path retains characteristics such as closedness if both input paths are closed.

Return

a Path3D representing the blended result of the two input paths

Parameters

other

the other RectifiedPath3D to be blended with the current path

blendFunction

a function that provides blending weights based on a normalized parameter (t-value)


fun Segment2D.mix(other: Segment2D, f0: Double, f1: Double, f2: Double, f3: Double): Segment2D(source)

Blends the properties of two Segment2D instances based on the provided weights for each control point and the corner property.

The resulting Segment2D is computed by interpolating between the corresponding properties of this segment and the other segment, with specific weights for start, control points, end, and corner.

Return

a new Segment2D that is the blended result

Parameters

other

the Segment2D to blend with the current segment

f0

the blend factor for the start points

f1

the blend factor for the first control points

f2

the blend factor for the second control points

f3

the blend factor for the end points


fun Segment3D.mix(other: Segment3D, f0: Double, f1: Double, f2: Double, f3: Double): Segment3D(source)

Creates a new Segment3D by blending the coordinates of two input segments using specified weights.

This function performs a weighted blending operation between the start, control, and end points of two cubic Segment3D instances, resulting in a new blended segment.

Return

a new Segment3D that represents the blended result

Parameters

other

the other Segment3D to blend with

f0

the blending weight for the starting point of the segment

f1

the blending weight for the first control point of the segment

f2

the blending weight for the second control point of the segment

f3

the blending weight for the ending point of the segment


fun ShapeContour.mix(other: ShapeContour, factor: Double): ShapeContour(source)

Mix between two ShapeContour instances

Parameters

other

other ShapeContour to mix with

factor

the blend factor between 0.0 and 1.0

See also


fun ShapeContour.mix(other: ShapeContour, factor: (Double) -> Double): ShapeContour(source)