View source: R/curvature_tangle.R

curvature_tangle | R Documentation |

Calculate total curvature by taking the derivative of the Zahn and Roskies tangent angle function

```
curvature_tangle(landmark_matrix, iterations)
```

`landmark_matrix` |
is a |

`iterations` |
is the number of times to run the spline interpolation procedure. The more times this is run, the more the specimen will be sampled. Every 1-2 iterations adds an order of magnitude of interpolated landmarks. |

a numeric vector length 1 indicating the total curvature in radians.

```
# a landmark matrix describing a 1/8 unit circle
x1 <- seq(0, sqrt(2)/2, length.out=9)
y1 <- sqrt(1-x1^2)
mdat1 <- matrix(c(x1, y1), nrow = length(x1), ncol = 2)
# total curvature should be approximately pi/4
abs(curvature_tangle(mdat1, 10))
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.