Difference between revisions of "love.math.newBezierCurve"
m |
(→See Also) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | + | curve = love.math.newBezierCurve( vertices ) | |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
− | {{param|table|vertices|The vertices of the control polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}.}} | + | {{param|table|vertices|The vertices of the control polygon as a table in the form of <code><nowiki>{x1, y1, x2, y2, x3, y3, ...}</nowiki></code>.}} |
+ | |||
=== Returns === | === Returns === | ||
{{param|BezierCurve|curve|A Bézier curve object.}} | {{param|BezierCurve|curve|A Bézier curve object.}} | ||
Line 16: | Line 17: | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | + | curve = love.math.newBezierCurve( x1, y1, x2, y2, x3, y3, ... ) | |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
Line 30: | Line 31: | ||
* [[parent::love.math]] | * [[parent::love.math]] | ||
* [[Constructs::BezierCurve]] | * [[Constructs::BezierCurve]] | ||
+ | * [[BezierCurve:render]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Creates a new [[BezierCurve]] object.}} | {{#set:Description=Creates a new [[BezierCurve]] object.}} | ||
+ | |||
== Other Languages == | == Other Languages == | ||
{{i18n|love.math.newBezierCurve}} | {{i18n|love.math.newBezierCurve}} |
Latest revision as of 17:31, 20 November 2021
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.
Contents
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
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info