Skip to contents

coo_shearx applies a shear mapping on a matrix of (x; y) coordinates (or a list), parallel to the x-axis (i.e. x' = x + ky; y' = y + kx). coo_sheary does it parallel to the y-axis.

Usage

coo_shearx(coo, k)

coo_sheary(coo, k)

Arguments

coo

matrix of (x; y) coordinates or any Coo object.

k

numeric shear factor

Value

a matrix of (x; y) coordinates.

Examples

coo <- coo_template(shapes[11])
coo_plot(coo)
coo_draw(coo_shearx(coo, 0.5), border="blue")
coo_draw(coo_sheary(coo, 0.5), border="red")