Name |
curveTangent()曲线切线 |
||||||||||
Examples |
noFill(); curve(5, 26, 73, 24, 73, 61, 15, 65); int steps = 6; for (int i = 0; i <= steps; i++) { float t = i / float(steps); float x = curvePoint(5, 73, 73, 15, t); float y = curvePoint(26, 24, 61, 65, t); //ellipse(x, y, 5, 5); float tx = curveTangent(5, 73, 73, 15, t); float ty = curveTangent(26, 24, 61, 65, t); float a = atan2(ty, tx); a -= PI/2.0; 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(a, b, c, d, t) |
||||||||||
Parameters |
|
||||||||||
Returns |
float |
||||||||||
Related |
curve() |
- 本文固定链接: http://iprocessing.cn/2017/07/29/curvetangent曲线切线/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表