curve_it: 'Curvify' polygon-based objects.

Description Usage Arguments Details Value Examples

Description

Curved caracture from a SpatialPolygons or SpatialPolygonsDataFrame object, controlled by a shape parameter. This can pass through the nodes of the original object (-1 < shape parameter < 0) or go near to them (0 < shape parameter < 1).

Usage

1
2
curve_it(spdf,s)
spdf 

Arguments

s

shape parameter as in xspline

spdf

a SpatialPolygons or SpatialPolygonsDataFrame object

Details

This is based on the xspline function. In particular, the shape parameter is the same as in that function.

Value

a SpatialPolygons curved caricature

Examples

1
2
3
4
5
'indianred' %>% adjustcolor(alpha.f=0.3) -> ired
"POLYGON((0 0,0 2,1 3.5,3 3,4 1,3 0,0 0))" %>% readWKT -> p1
p1 %>% make_canvas %>% plot_it(col=ired)
p1 %>% curve_it(1) %>% plot_it(col=ired,lty=2)
p1 %>% curve_it(0.5) %>% plot_it(col=ired,lty=2)

chrisbrunsdon/caricRture documentation built on May 13, 2019, 6:52 p.m.