[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: a few issues with paintops : bristle and speed
From:       Martin Renold <martinxyz () gmx ! ch>
Date:       2007-03-13 10:02:07
Message-ID: 20070313100206.GA10583 () old ! homeip ! net
[Download RAW message or body]

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
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic