I'm working on nice UI for working with assembly instruction cards recently. Today I've spent some time fiddling around with
@Ivan Reese's
https://github.com/ivanreese/knob trying to use it for switching condition codes in a smooth manner. Condition codes are discrete values, and there are just 16 of them but it feels nice to switch them out in a continuous manner. Still not finished but the results look interesting so sharing them here. (
code)
A key component of the gesture logic is fitting a circle to a bunch of points. Turns out it's really hard. I've wasted quite a bit of time before stumbling on Nikaolai Chernov's excellent home page:
https://people.cas.uab.edu/~mosya/cl/CPPcircle.html . Strongly recommend bookmarking this one - you never know when you'll have to fit a circle to your data!