Difference between revisions of "BezierCurve:evaluate"

(Function was renamed)
m (See Also: forum linked.)
Line 18: Line 18:
 
* [[BezierCurve:render]]
 
* [[BezierCurve:render]]
 
* [[love.math]]
 
* [[love.math]]
 +
* [https://love2d.org/forums/viewtopic.php?f=4&t=83825 Bezier Curves, how to trace a line? - LÖVE forum]
 +
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Evaluate Bézier curve at parameter t.}}
 
{{#set:Description=Evaluate Bézier curve at parameter t.}}
 +
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|BezierCurve:evaluate}}
 
{{i18n|BezierCurve:evaluate}}

Revision as of 16:43, 19 May 2017

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

Evaluate Bézier curve at parameter t. The parameter must be between 0 and 1 (inclusive).

This function can be used to move objects along paths or tween parameters. However it should not be used to render the curve, see BezierCurve:render for that purpose.

Function

Synopsis

x,y = BezierCurve:evaluate(t)

Arguments

number t
Where to evaluate the curve.

Returns

number x
x coordinate of the curve at parameter t.
number y
y coordinate of the curve at parameter t.

See Also


Other Languages