Saturday, July 19, 2014

Miter Joint

Good noon!

I decided it's better to draw each curve's outline separately rather than together as one giant polygon. This fixed some of the inside-out holes that were appearing in the mouth test from yesterday. Because of this, I am also restricting myself to calculating and drawing the outlines of corners separately as well. This works great for convex corners! Check it out:


I'm emulating the Miter Joint from this article which basically tries to create a sharp corner or otherwise creates a squared corner if the sharp part would exceed the Miter Limit, which is defined by the user. What's cool is I can also use these points that are being calculated for these corners to create another bezier curve, meaning I can make rounded corners if I want to.

Now the tricky part is going to be figuring out how to do concave corners. I have to make it so the two curves that share that corner don't render in parts that exist past the opposite curve's boundary. I have no clue where to start with this, but I'll keep it in mind for later.

No comments:

Post a Comment