Name | curveTangent |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Examples |
# curveTangent 1 # https://processing.org/reference/curveTangent_.html noFill() curve(5, 26, 73, 24, 73, 61, 15, 65) steps <- 6 for (i in 0:steps) { t <- i/steps x <- curvePoint(5, 73, 73, 15, t) y <- curvePoint(26, 24, 61, 65, t) # ellipse(x, y, 5, 5) tx <- curveTangent(5, 73, 73, 15, t) ty <- curveTangent(26, 24, 61, 65, t) a <- atan2(ty, tx) a = a - HALF_PI line(x, y, cos(a) * 8 + x, sin(a) * 8 + y) } | ||||||||||
Description | Calculates the tangent of a point on a curve. There's a good definition of tangent on Wikipedia. | ||||||||||
Syntax | curveTangent( | ||||||||||
Parameters |
| ||||||||||
Related |
curve curveVertex curvePoint bezierTangent |
Cover
Reference
Tutorials
Bugs