Page 2 of 2

Re: Bezier Goodness

Posted: Fri Nov 08, 2013 2:31 pm
by Roland_Yonaba
I just came accross this article on Gamedev yesterday. I thought it would be good to share, maybe it can provide some ideas for the next iteration.
It talks about the deCasteljau algorithm and mention a few others techniques.
Post: http://www.gamedev.net/page/resources/_ ... rves-r3166

Love the lighting stuff, and the threaded rendering! Awesome!
Keep it up!

Re: Bezier Goodness

Posted: Fri Nov 08, 2013 8:03 pm
by Germanunkol
Nice, thanks for sharing the article! And thanks for the nice words.
I did a lot of reading on Beziers lately, it's really nice how much can be done with them relatively easily...

I might not go further with this project, because what I wanted to do seems almost impossible with today's internet speeds and the average CPU...
Maybe I will, though. But first I'll help Micha finish his Project.

Re: Bezier Goodness

Posted: Fri Jul 11, 2014 6:09 am
by digdugluv
I made a small bezier demo with the new http://love2d.org/wiki/love.math.newBezierCurve

Mouse left right to change number of curves. Mouse up down to change stroke width (has no FPS effect on my machine).
screenshot.png
screenshot.png (838.05 KiB) Viewed 2274 times
EDIT: added inspect.lua to love file

Re: Bezier Goodness

Posted: Fri Jul 11, 2014 7:23 am
by Germanunkol
Inspect.lua seems to be missing from the package?

Might be a capitalization thing (Linux is case-sensitive with file names)...
Edit: No, it's really missing. I only have a main.lua in the archive.

Re: Bezier Goodness

Posted: Fri Jul 11, 2014 12:41 pm
by digdugluv
Fixed. My bad.

Re: Bezier Goodness

Posted: Fri Jul 11, 2014 11:01 pm
by Ranguna259
I remember doing some stuff with bezier curves when love 0.9.0 first came out, it was originaly meant for animations but I droped it.

keys 1-9 to change drawing states, left mouse button to add a point to the current state and right mouse button to remove a point. You can move around existing points to change the curve.

Re: Bezier Goodness

Posted: Sat Jul 12, 2014 8:24 am
by Germanunkol
Love this stuff! Thank you both for sharing!

The code in the OP is of course obsolete. Now that Love 0.9 is out, making my own Bezier curves is pretty useless. I haven't done any benchmarking, but I'm sure Love's internal bezier curves are much faster than what I did.
Still it was fun to create!