Beziers?

Posted by DevonX on Nov. 26, 2006, 10:28 a.m.

Alright, I'm a little slow with trying to learn how beziers work. But for all of you people out there that also might be wondering how they work. I have found I little animation on Wikipedia that is amazing. How amazing? well, just by looking at this picture for about 10 seconds in about 15 minutes, I made my own little dynamic bezier curve in GM. Heres the little animation of it.

<B>EDIT:</B> If anyone wants the .gm6 for reference, just tell me and ill post the link. Im also working on how to make more than just 3 control points for it. Its a bit tricky.

<B>Controls:</B>

Left-drag - move point.

Enter - toggle lines between control points.

space - move points to random posistion.

<B>EDIT2:</B> Heres the editable, srry for the sloppy code in the 3-control point object. http://64digits.com/users/superdevon4/Bezier3.gm6

I also added an animation picture (from wikipedia) to illistrate how more complex beziers work. Also heres the wiki link just in case anyone else is confused from the pix and/or .gm6

http://en.wikipedia.org/wiki/Bezier_curve

Comments

Siert 17 years, 5 months ago

Why not just post the link so you don't have to later?

DevonX 17 years, 5 months ago

well, im not going to unless someone wants it.

Graydon 17 years, 5 months ago

whats the point of a Bezier

DevonX 17 years, 5 months ago

say ur makin a terrain generation program, you might want to use smooth curvers, so you would use beizers.

AthamX 17 years, 5 months ago

I'll take a look at that .GM6

aeron 17 years, 5 months ago

I'm interested.

DevonX 17 years, 5 months ago

alright, it will be up in a min, i just added an object with four control points, the one with only three is coded a bit slopy.

DevonX 17 years, 5 months ago

im trying to figure out a more efficient way of doing this in this method.

DevonX 17 years, 5 months ago

if you take a peek at how i coded the 4-control point object, you can see that its not really that hard, its just a lot of code. I think im going to redo this with arrays and more for statements to make it way more dynamic.

OL 17 years, 5 months ago

Those animations are rather interesting.