首页 > 文档 > quadraticVertex()二次贝塞尔曲线的顶点坐标
2017
08-01

quadraticVertex()二次贝塞尔曲线的顶点坐标

Name

quadraticVertex()二次贝塞尔曲线的顶点坐标

   

Examples

quadraticVertex()二次贝塞尔曲线的顶点坐标 - 第1张  | Processing编程艺术

noFill();

strokeWeight(4);

beginShape();

vertex(20, 20);

quadraticVertex(80, 20, 50, 50);

endShape();

quadraticVertex()二次贝塞尔曲线的顶点坐标 - 第2张  | Processing编程艺术

noFill();

strokeWeight(4);

beginShape();

vertex(20, 20);

quadraticVertex(80, 20, 50, 50);

quadraticVertex(20, 80, 80, 80);

vertex(80, 60);

endShape();

Description

Specifies vertex coordinates for quadratic Bezier curves. Each call to quadraticVertex() defines the position of one control points and one anchor point of a Bezier curve, adding a new segment to a line or shape. The first time quadraticVertex() is used within a beginShape() call, it must be prefaced with a call to vertex() to set the first anchor point. This function must be used between beginShape() and endShape() and only when there is no MODE parameter specified to beginShape(). Using the 3D version requires rendering with P3D (see the Environment reference for more information).

指定二次贝塞尔曲线的顶点坐标。对 quadraticVertex () 的每次调用都定义了贝塞尔曲线的一个控制点和一个锚点的位置, 并将新线段添加到线条或形状中。第一次在 beginShape () 调用中使用 quadraticVertex () , 必须先使用对顶点的调用 () 来设置第一个定位点。此函数必须在 beginShape () endShape () 之间使用, 并且仅当没有指定的模式参数 beginShape ()。使用3D 版本需要用 P3D 进行渲染 (有关更多信息, 请参见环境参考)

Syntax

quadraticVertex(cx, cy, x3, y3)

quadraticVertex(cx, cy, cz, x3, y3, z3)

Parameters

cx

float: the x-coordinate of the control point

控制点的X坐标

cy

float: the y-coordinate of the control point

控制点的Y坐标

x3

float: the x-coordinate of the anchor point

定位点的X坐标

y3

float: the y-coordinate of the anchor point

定位点的Y坐标

cz

float: the z-coordinate of the control point

控制点的Z坐标

z3

float: the z-coordinate of the anchor point

定位点的Z坐标

Returns

void

Related

curveVertex()
vertex()
bezierVertex()
bezier()



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

留下一个回复

你的email不会被公开。