love.math.newBezierCurve

love.math.newBezierCurve

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Creates a new BezierCurve object.

The number of vertices in the control polygon determines the degree of the curve, e.g. three vertices define a quadratic (degree 2) Bézier curve, four vertices define a cubic (degree 3) Bézier curve, etc.

Function

Synopsis

curve = love.math.newBezierCurve( vertices )

Arguments

table vertices
The vertices of the control polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}.

Returns

BezierCurve curve
A Bézier curve object.

Function

Synopsis

curve = love.math.newBezierCurve( x1, y1, x2, y2, x3, y3, ... )

Arguments

number x1
The position of the first vertex of the control polygon on the x-axis.
number y1
The position of the first vertex of the control polygon on the y-axis.
number x2
The position of the second vertex of the control polygon on the x-axis.
number y2
The position of the second vertex of the control polygon on the y-axis.
number x3
The position of the third vertex of the control polygon on the x-axis.
number y3
The position of the third vertex of the control polygon on the y-axis.

Returns

BezierCurve curve
A Bézier curve object.

See Also

© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.math.newBezierCurve

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部