## Tapered Bezier!

Midgardsormr
Fusionator
Posts: 1097
Joined: Wed Nov 26, 2014 8:04 pm
Location: Los Angeles, CA, USA
Been thanked: 74 times
Contact:

### Tapered Bezier!

Bezier_00_cover-1.jpg

http://www.bryanray.name/wordpress/tape ... or-fusion/

Two things have been bugging me for a while: BezierTo() is broken*, and Fusion can't draw a tapered curve. So I am fixing both of those things. First step toward that goal is this tapered Bezier curve Fuse.

I'm hoping today to be able to break open the Shape metatable and replace the BezierTo() method. That one won't be able to taper, though, because the technique I'm using breaks the line styling. Once I've done that, I'd love to make a new Lightning Fuse with curved segments and better directionality to the forks.

*Turns out BezierTo() isn't broken; it was just poorly documented. The taper complaint remains, though.
An update: I've extended the tapered Bezier to Lines, Ellipses, and Rectangles. The fuse is now MT_TaperedShapes. I wanted to do PolyLines, but there's currently no way to get the data from a PolyLine control into the Fuse itself.

You do not have the required permissions to view the files attached to this post.
Last edited by Midgardsormr on Thu Sep 12, 2019 3:32 pm, edited 3 times in total.

SirEdric
Fusionator
Posts: 1869
Joined: Tue Aug 05, 2014 10:04 am
Real name: Eric Westphal
Been thanked: 112 times
Contact:

### Re: Tapered Bezier!

NICE!!!

AndrewHazelden
Fusionator
Posts: 1310
Joined: Fri Apr 03, 2015 3:20 pm
Location: West Dover, Nova Scotia, Canada
Been thanked: 38 times
Contact:

### Re: Tapered Bezier!

Neat stuff @Midgardsormr!

I like the use of self:BeginControlNest() and self:EndControlNest() for the UI. I should start using that approach too.

Reading the fuse header comments, was the creation date for version 0.4 of this fuse really two years ago on Aug 19, 2017?

Midgardsormr
Fusionator
Posts: 1097
Joined: Wed Nov 26, 2014 8:04 pm
Location: Los Angeles, CA, USA
Been thanked: 74 times
Contact:

### Re: Tapered Bezier!

AndrewHazelden wrote:
Tue Aug 20, 2019 11:01 am
I like the use of self:BeginControlNest() and self:EndControlNest() for the UI.

Reading the fuse header comments, was the creation date for version 0.4 of this fuse really two years ago on Aug 19, 2017?
The ControlNest actually came in when I stole the Create function from the Lines Fuse. Synchronicity. But it amused me as soon as I saw it!

Version 0.2 of the previous Fuse was dated Aug 16, 2017. Guess I forgot to change the year... Fixed now.

French_Fry
Fusionista
Posts: 329
Joined: Tue Aug 05, 2014 8:04 am
Location: Nashville, TN
Contact:

### Re: Tapered Bezier!

Very cool tool Bryan! Kind hard to fathom that something like this needs to be written as a third-party tool ( as opposed to a standard out of the box option), but it looks great and I can see how this may be the first step towards something way more powerful! Good job!

Dunn
Moderator
Posts: 477
Joined: Mon Aug 04, 2014 4:27 am
Location: Hamburg, Germany
Been thanked: 2 times
Contact:

### Re: Tapered Bezier!

Nice one Bryan!

ps. thanks for the shout out

Midgardsormr
Fusionator
Posts: 1097
Joined: Wed Nov 26, 2014 8:04 pm