# Straight and curved ramp anchors

Both ramps use integer percentages from 0 through 100. `surface-T` follows
the whole usable contact path by distance, including the horizontal floor.
The named `surface-start`, `surface-mid`, and `surface-end` anchors match
`surface-0`, `surface-50`, and `surface-100`. The older `(R.T)` shorthand
also selects `surface-T`.

`show anchors` marks selected points on the ramp and places their names in a
numbered table. Coincident endpoints share one marker. Choose a few families
at a time to keep the table readable.

## Straight ramp

The straight ramp starts at the wall, follows a flat floor, then rises along
the incline. `ramp-left` mirrors the whole body. The direction of every
family follows the node's orientation: rightward on `ramp`, leftward on
`ramp-left`, unless an endpoint description below specifies a vertical edge.

| Family | `0` endpoint | `100` endpoint |
| --- | --- | --- |
| `surface` | `surface-start` / `wall-bottom` | `surface-end` / `ramp-top` |
| `floor` | `floor-start` | `floor-end` / `ramp-foot` |
| `incline` | `ramp-foot` | `ramp-top` |
| `wall-surface` | `wall-bottom` | `wall-top` |
| `wall-back` | `base-start` | back of the wall top |
| `wall-tip` | back of the wall top | `wall-top` |
| `base` | `base-start` | `base-end` |
| `end` | `base-end` | `ramp-top` |

Each straight edge family interpolates between its two endpoints. The
`surface` percentage instead uses the *combined length* of the floor and
incline. Its `50` point may be on the floor or the incline, depending on
their lengths. At the sharp joint, the tangent guide uses the incline side.
The `center` anchor is the midpoint of the body's bounding box; its height
uses the taller of the wall and incline.

```latex
\node[ramp,minimum width=8.6cm,ramp run=2.6cm,ramp rise=1.5cm,
  show anchors,
  physics debug/anchor list={wall-top,ramp-foot,ramp-top,center},
  physics debug/anchor families={floor,incline,wall-surface,base,end},
  physics debug/anchor samples={0,50,100}] (R) {};
```

## Curved ramp

The curved ramp joins a horizontal floor to a circular arc with a continuous
tangent. `curved-ramp-left` mirrors it. `surface-T` uses the combined floor
length and arc length. `curve-T` samples the circular portion only. The
default flat floor is 3.75 cm, 50% longer than the previous 2.5 cm default;
set `curved ramp floor length` to choose another value.

| Family | `0` endpoint | `100` endpoint |
| --- | --- | --- |
| `surface` | `surface-start` | `surface-end` / `curve-end` |
| `floor` | `floor-start` / `surface-start` | `floor-end` / `curve-start` |
| `curve` | `curve-start` | `curve-end` |
| `start` | `base-start` | `surface-start` |
| `base` | `base-start` | `base-end` / `back-bottom` |
| `back` | `back-bottom` | `back-top` |
| `top` | `curve-end` | `back-top` |

`curve-center` is the circle's centre, above the arc foot; it is not a point
on the outline. The body's `center` is the midpoint of its bounding box.

```latex
\node[curved-ramp,curved ramp radius=4cm,curved ramp angle=75,
  show anchors,
  physics debug/anchor list={curve-start,curve-mid,curve-end},
  physics debug/anchor families={surface,curve,start,base,back,top},
  physics debug/anchor samples={0,50,100}] (C) {};
```

## Tangent and normal guides

`tangent-before-T` and `tangent-after-T` straddle `surface-T` along its local
tangent; `normal-T` points outward. On a curved ramp, the `curve-` prefixed
guide families use `curve-T` instead. `ramp guide length` sets their spacing.
Guide points are deliberately outside the ramp boundary when appropriate.

The [12-page show-anchors gallery](ramp-anchor-coverage.pdf) covers straight
and curved ramps in both directions, every boundary family, a tall-wall
straight ramp, and the tangent and normal guides. Its
[copy-ready source](../examples/ramp-anchor-coverage.tex) uses the same
overlay as the examples above. Compile it from the package root with:

```sh
pdflatex -interaction=nonstopmode -halt-on-error -output-directory=docs \
  examples/ramp-anchor-coverage.tex
```
