Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Great idea, a couple of small improvements would make it even better:

* Use a moving average, to avoid flickery transitions

* Animate the text to the target size rather than changing in steps. This would mitigate the flickering problem too.



Hi, creator of the headtrackr library here. As far as the headtrackr library goes, it does include a smoother (moving average) to avoid jittering of the tracking. It's set pretty low by default though, since heavy smoothing will lead to lag in tracking sudden movements. Any kind of moving average is a trade-off between responsiveness and smoothness, unfortunately...


One of the best ways to deal with this is to create a minimum lag for changes in direction which is dependent on the magnitude of change.

AKA, assuming you just bumped v from 10 - 11 based on a change from 100.9cm to 101cm then going back to 100.9cm will not change things for say 1second, going to 99cm changes things in 100ms second, 98cm changes in 100ms.


Hmm, that's interesting. Is there any name for that kind of method? I might look at implementing it.


Hysteresis


Yes, but Kalman filter.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: