Some paint programs like Manga Studio include brushes that taper down to a point at the ends of the stroke. I have a few ideas about how this could be implemented, but the ideas I have seem problematic / inefficient to me... I haven't been able to find any information about this task via Google, so thought I'd ask here.
Does anyone know of any algorithms for creating a tapered stroke in AWT?
What I need to figure out is how to convert the mouse coordinates I already have from mouse events for example (x50,y50)-(x37,y20)-(x47,y10) into arguments for Path2D.curveTo() or something of that nature. How do you do the math for tapering the stroke? (I don't imagine there's any way to do this without a fair amount of math... though I suppose I could be wrong.)
Thanks!
Edit: Note that a user is allowed to draw freehand onto an image using this stroke, which means the sides of the stroke must curve to match the user's pen.