Sunday, September 24

The Right Curve for the Job

Today I've been working with digital ink strokes again. After a couple of tests in Flash I have (almost) decided on using cubic bézier curves to generate brush strokes. Sadly you can't, for all that I know, draw cubic bézier curves in Flash. At least not with the standard graphic libraries. I ought to be able to write a library myself but perhaps it's not as easy as I think.

The nice thing with cubic bézier curves is that they have four handles per curve and if you've ever uses Illustrator or Freehand or Xara this is what you are used to. You define two end points and then you've got two guide points that define the curve. My previous brush stroke prototypes where both quadratic bézier curves (that only have one guide point) and they have the tendency to not look so good when you draw strokes with more than one segment.

I'm sorry I couldn't show you a prototype this time but I'm afraid these things are gonna take some time if I'm going to get it right. All tests that I did today came out weird and not as smooth as I wanted. Before I can decide I'll have to verify that you can create advanced strokes with a dynamic line weight using these kinds of curves. It's all about line weight really. Drawing curves is nothing new. The trick is to make a convincing brush stroke that we can control exactly the way we want.

Even though it's terrible boring to work on these damn curves I'm looking forward to when they work the way I want so I can go on to making convincing feathering. That's when it gets alot more interesting.

No comments: