Learn R Programming

bezier (version 1.1.2)

summary.bezierArcLength: Summary of a Bezier arc length estimation

Description

Prints a summary of the output of bezierArcLength (a list of class "bezierArcLength"). This includes the change in arc length once arc length estimation is stopped, the number of iterations until convergence and the number of points along the Bezier used to estimate arc length. If the input is a Bezier spline then the results are printed separately for each curve in the spline. See bezierArcLength for details.

Usage

# S3 method for bezierArcLength
summary(object, ...)

Arguments

object

a list of class "bezierArcLength" (the output of bezierArcLength).

...

further arguments passed to or from other methods.

Value

a NULL value.

See Also

bezierArcLength, bezier

Examples

Run this code
# NOT RUN {
## BEZIER CURVE ARC LENGTH ESTIMATION ##
## BEZIER CURVE CONTROL POINTS
p <- matrix(c(0,0, 1,4, 2,2), nrow=3, ncol=2, byrow=TRUE)

## FIND THE ARC LENGTH ALONG THE BEZIER CURVE
bcurve <- bezierArcLength(p=p, t1=0, t2=1)

## PRINT SUMMARY
print(summary(bcurve))


## BEZIER SPLINE ARC LENGTH ##
## BEZIER SPLINE CONTROL POINTS
p <- matrix(c(0,0, 1,4, 2,2, 3,0, 4,4), nrow=5, ncol=2, byrow=TRUE)

## FIND THE ARC LENGTH ALONG THE BEZIER SPLINE
## HERE t2 = 1 SO ARC LENGTH IS ONLY CALCULATED FOR THE
##   FIRST BEZIER CURVE OF THE SPLINE
bspline <- bezierArcLength(p=p, t1=0, t2=2, deg=2)

## PRINT SUMMARY
print(summary(bspline))
# }

Run the code above in your browser using DataLab