Learn R Programming

ggrepel (version 0.4)

spring_force: Compute the spring force upon point a from point b.

Description

The force increases with the distance between the points, similar to Hooke's law for springs.

Usage

spring_force(a, b, force = 1e-06)

Arguments

a
A point like c(x, y)
b
A point like c(x, y)
force
Magnitude of the force (defaults to 1e-6)