# Dcurvature

`Dcurvature` provides a fast C++/Rcpp implementation of discrete curvature on
ordered 2D curves, plus a Shiny app for PCA component selection using
curvature-based elbow detection.

## Installation

```r
# install.packages("remotes")
remotes::install_local("path/to/Dcurvature")
```

## Core usage

```r
library(Dcurvature)

pts <- cbind(
  x = seq(0, 1, length.out = 12),
  y = sin(seq(0, pi, length.out = 12))
)

kappa <- curvature(pts)
head(kappa)
```

## Example data

```r
x <- load_example_data()
str(x)
```

## Run the app

```r
if (interactive()) {
  run_curvature_app()
}
```
