首页 > 文档 > bezier()贝塞尔曲线
2017
07-28

bezier()贝塞尔曲线

Name

bezier()贝塞尔曲线

   

Examples

bezier()贝塞尔曲线 - 第1张  | Processing编程艺术

noFill();

stroke(255, 102, 0);

line(85, 20, 10, 10);

line(90, 90, 15, 80);

stroke(0, 0, 0);

bezier(85, 20, 10, 10, 90, 90, 15, 80);

bezier()贝塞尔曲线 - 第2张  | Processing编程艺术

noFill();

stroke(255, 102, 0);

line(30, 20, 80, 5);

line(80, 75, 30, 75);

stroke(0, 0, 0);

bezier(30, 20, 80, 5, 80, 75, 30, 75);

Description

Draws a Bezier curve on the screen. These curves are defined by a series of anchor and control points. The first two parameters specify the first anchor point and the last two parameters specify the other anchor point. The middle parameters specify the control points which define the shape of the curve. Bezier curves were developed by French engineer Pierre Bezier. Using the 3D version requires rendering with P3D (see the Environment reference for more information).

在屏幕上绘制贝塞尔曲线。这些曲线由一系列锚点和控制点定义。前两个参数指定第一个定位点, 最后两个参数指定另一个定位点。中间参数指定用于定义曲线形状的控制点。贝塞尔曲线是由法国工程师皮埃尔贝塞尔。使用3D 版本需要用 P3D 进行渲染 (有关更多信息, 请参见环境参考)

Syntax

bezier(x1, y1, x2, y2, x3, y3, x4, y4)

bezier(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4)

Parameters

x1

float: coordinates for the first anchor point浮点数: 第一个锚点的坐标

y1

float: coordinates for the first anchor point浮点数: 第一个锚点的坐标

z1

float: coordinates for the first anchor point浮点数: 第一个锚点的坐标

x2

float: coordinates for the first control point浮点数: 第一控制点的坐标

y2

float: coordinates for the first control point浮点数: 第一控制点的坐标

z2

float: coordinates for the first control point浮点数: 第一控制点的坐标

x3

float: coordinates for the second control point浮点数: 第二控制点的坐标

y3

float: coordinates for the second control point浮点数: 第二控制点的坐标

z3

float: coordinates for the second control point浮点数: 第二控制点的坐标

x4

float: coordinates for the second anchor point浮点型:第二锚点的坐标

y4

float: coordinates for the second anchor point浮点型:第二锚点的坐标

z4

float: coordinates for the second anchor point浮点型:第二锚点的坐标

Returns

void

Related

bezierVertex()
curve()



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

留下一个回复

你的email不会被公开。