a few issues with paintops : bristle and speed

Martin Renold martinxyz at gmx.ch
Tue Mar 13 11:02:07 CET 2007


hi,

On Mon, Mar 12, 2007 at 08:11:06PM +0100, Cyrille Berger wrote:
> > Given the delta between the previous position and the current position you
> > get the speed, and I think that that is already in the KisPaintInformation,
> > or it could be stored in the paintop. Or do I miss something here?
> I thought so too :) But it's not reliable (especially if you start to use the 
> line tool...), you need the time to make it work well.

You might also want to smooth the speed a little. That would need an
extra state. I don't know how important that is for your particular
algorithm, but I have done it everywhere in MyPaint. You could use 
speed_slow = 0.9*speed_slow + 0.1*distance_moved. (For fixed time steps;
with some exp() math you get the same effect for variable time steps).

bye,
Martin


More information about the kimageshop mailing list