首页 > 文档 > curveVertex()曲线顶点
2017
08-01

curveVertex()曲线顶点

Name

curveVertex()曲线顶点

   

Examples

curveVertex()曲线顶点 - 第1张  | Processing编程艺术curveVertex()曲线顶点 - 第2张  | Processing编程艺术curveVertex()曲线顶点 - 第3张  | Processing编程艺术

noFill();

beginShape();

curveVertex(84, 91);

curveVertex(84, 91);

curveVertex(68, 19);

curveVertex(21, 17);

curveVertex(32, 100);

curveVertex(32, 100);

endShape();

Description

Specifies vertex coordinates for curves. This function may only be used between beginShape() and endShape() and only when there is no MODE parameter specified to beginShape(). The first and last points in a series of curveVertex() lines will be used to guide the beginning and end of a the curve. A minimum of four points is required to draw a tiny curve between the second and third points. Adding a fifth point with curveVertex() will draw the curve between the second, third, and fourth points. The curveVertex() function is an implementation of Catmull-Rom splines. Using the 3D version requires rendering with P3D (see the Environment reference for more information).

指定曲线的顶点坐标。此函数只能在 beginShape () endShape () 之间使用, 并且仅当没有指定为 beginShape () 的模式参数。一系列 curveVertex () 行中的第一个和最后一个点将用于引导曲线的开始和结束。在第二和第三点之间绘制一条极小的曲线需要至少四点。在 curveVertex () 中添加第五点将在第二、第三和第四点之间绘制曲线。curveVertex () 函数是一个卡特莫尔-rom 样条的实现。使用3D 版本需要用 P3D 进行渲染 (有关更多信息, 请参见环境参考)

Syntax

curveVertex(x, y)

curveVertex(x, y, z)

Parameters

x

float: the x-coordinate of the vertex

 

顶点的 x 坐标

y

float: the y-coordinate of the vertex

 

顶点的 y 坐标

z

float: the z-coordinate of the vertex

顶点的 z坐标

Returns

void

Related

curve()
beginShape()
endShape()
vertex()
bezier()
quadraticVertex()



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。