Wednesday, November 18, 2009

Splines!

Sorry for not posting in so long. Went through a super heavy week, then schoolwork catchup, then reading. Anyway, I have returned to SFML and been doodling a little bit in various small projects I'm piecing together. I decided I should kill two birds with one stone and clear out more of my fixfox tabs (down to 71!) AND make a tech demo/proof of concept for myself on splines.

A while back I was reading up on them heavily, I didn't want to use a formula I didn't truly understand. I got them down great, and realized how awesome of an exercise they actually were in matrix maths!

That aside, I never actually DID anything with them. So I just whipped this up in about an hour and a half. It mainly took so long because I was trying different things with SFML's Shape system. I think in the end it came out pretty nice though! It currently supports Hermite, Cubic bezier, and Catmull-Rom splines. I would like to make it more interactive, so that one can simply drag the points around rather than just generating a new one and sliding about it. Probably should eat some supper now though, mmmmm. Beef stew to the rescue!


No comments:

Post a Comment