Name |
curveTightness()曲线松紧度 |
||
Examples |
// Move the mouse left and right to see the curve change
void setup() { size(100, 100); noFill(); }
void draw() { background(204); float t = map(mouseX, 0, width, -5, 5); curveTightness(t); beginShape(); curveVertex(10, 26); curveVertex(10, 26); curveVertex(83, 24); curveVertex(83, 61); curveVertex(25, 65); curveVertex(25, 65); endShape(); } |
||
Description |
Modifies the quality of forms created with curve() and curveVertex(). The parameter tightnessdetermines how the curve fits to the vertex points. The value 0.0 is the default value for tightness(this value defines the curves to be Catmull-Rom splines) and the value 1.0 connects all the points with straight lines. Values within the range -5.0 and 5.0 will deform the curves but will leave them recognizable and as values increase in magnitude, they will continue to deform. 修改用曲线 () 和 curveVertex () 创建的窗体的质量。参数 tightnessdetermines 曲线如何适应顶点点。值0.0 是密度的默认值 (此值定义了要为卡特莫尔的曲线), 而值1.0 则用直线连接所有点。范围-5.0 和5.0 内的值将变形的曲线, 但将离开他们可辨认的, 随着价值的增加, 他们将继续变形。 |
||
Syntax |
curveTightness(tightness) |
||
Parameters |
|
||
Returns |
void |
||
Related |
curve() |
- 本文固定链接: http://iprocessing.cn/2017/07/29/curvetightness曲线松紧度/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表