Add Teeth to line

Share:

Description

Add teeth marks to a line.

Usage

1
teeth(x, y, h, rot, col = "black", border = "black")

Arguments

x

x-coordinates

y

y coordinates

h

height of tooth

rot

rotation of teeth

col

color of line

border

color of border, default= col

Details

The rotation is usually determined by consecutive x-y points

Value

Graphical Side effect

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu

See Also

thrust

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 plot(c(-5,5), c(-5,5), asp=1, type='n' )
  
ff=list()
ff$x=c(-4.850,-4.700,-3.934,-2.528, 0.603, 2.647, 3.861, 2.626)
ff$y=c(-4.045,-2.087,-0.710, 0.172, 1.291, 2.087,-0.753,-4.131)

lines(ff)
points(ff)

### thrust uses teeth
thrust(ff$x, ff$y, h=2, N=12, REV=FALSE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.