Available since LÖVE 0.10.0
This function is not supported in earlier versions.
Get a list of coordinates on a specific part of the curve, to be used with love.graphics.line.
This function samples the Bézier curve using recursive subdivision. You can control the recursion depth using the depth parameter.
If you are just need to know the position on the curve given a parameter, use BezierCurve:evaluate.
coordinates = BezierCurve:renderSegment( startpoint, endpoint, depth )
number startpoint
number endpoint
number depth (5)
table coordinates
curve = love.math.newBezierCurve({25,25,75,50,125,25}) function love.draw() love.graphics.line(curve:renderSegment(0, .75)) end
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/BezierCurve:renderSegment