On Fri, 6 Dec 2013 10:19:43 -0200 Gustavo Sverzut Barbieri <barbi...@gmail.com> said:
> 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!) actually he didnt describe it at all. he just said "bad". that doesn't say much at all. using map to rotate a dial or drawing one with gl at the same angle is going to have the same results. i don't see how gl magically cures anything here. if the issue is the speed of the dial - how it reacts, which i SUSPECT is his point (but he didnt describe it that way) then i expect the issue has nothing to do wi th edje or map but entirely to do with angle control. e uses an embryo program to do this in the edj file. just get that algorithm right (to what you want) and presto. gl won't fix the algorithm. the cpufreq edj file has latency on change - a message to the edj obj says "display freq X" and the edj file then animates TO that new position over a period of time with interpolation - and if another message comes in while its still interpolating.. it begins FROM its current position. it's smooth at any rate. > 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! thats what the cpufreq tacho does in e17's theme. that's why i pointed to it. :) > -- > 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 > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ 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