On Fri, Dec 6, 2013 at 12:25 AM, Carsten Haitzler <ras...@rasterman.com> wrote: > On Fri, 6 Dec 2013 00:18:58 +0100 Andreas Volz <li...@brachttal.net> said: > >> Hello, >> >> I've the use case to develop a digital cluster instrument demo with >> Edje or Elementary. Main element are two rotating pointers as on this >> mechanical device, but with a big display: >> >> http://www.passatplus.de/umbauten/kombiinstrument/tachoringe.jpg >> >> My requirement is that that speed should be around 400°/sec rotary >> speed without visual bad result. >> >> I developed two first demos. One with a 2D image which is rotated with >> a edje map. Another with a prerendered pointer for each angle. Both >> solutions work, but visual effect is bad for very fast rotating >> pointers. > > have you looked at the tacho used for cpufreq in e? it does a separate shadow > object that is "below" the dial so its in the right position (split shadow out > from the dial needle itself). it's always looked rather nice to me... shadow > is > correct, dial can rotate any way i like and at any speed...
he describes problem with fast changes... (okay, the shadow thing is likely a problem as well and easy to fix as you said!) Andreas, don't do a naive code for gauges... you'll end with different results than you expected. If you think about real gauges, doesn't matter which data feed speed you get, the needle/pointer will take some time to get there. We're used to this latency and our brain requires it for the continuity feeling. IOW, change your code to just save the last and current pointer value somewhere then you start an animator that reads this value. If last != current, then you interpolate and save last. On the next animator callback you'll interpolate again, and again... until it converge to the current value. At this time you can stop the animator and save some application wakeups. The interpolation math can be linear (simpler) or the accelerate, decelerate, sinusoidal... all of those are available in ecore animator pos map, but of course you can do the math your self and get your desired effect. The key is NOT to change the pointer to the new value immediately! -- Gustavo Sverzut Barbieri -------------------------------------- Mobile: +55 (19) 9225-2202 Contact: http://www.gustavobarbieri.com.br/contact ------------------------------------------------------------------------------ Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel