Hi.
How to draw the Bezier Curve in Love2D?
Thanks for replies.
Bezier Curve
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Bezier Curve
You have 2 options:
How to make a curve yourself:
also
- Make one yourself (see below)
- Use a library by vrld
How to make a curve yourself:
- Make a table for curve values
- Interpolate values for bézier curve function based on this: (depending on whenever you want a quadratic or cubic curve)
Quadratic:
Cubic:
for example, this is cubic function in Lua:Make a quadratic yourselfCode: Select all
function cubic(a, b, c, d, t) return (((1-t)^3)*a + 3*((1-t)^2)*t*b + 3*(1-t)*(t^2)*c + (t^3)*d) end
- And draw them ofcourse
also
The library is called LÖVE or Löve. love2d is used only for site domainArthes wrote:How to draw the Bezier Curve in Love2D?
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 0 guests