New predictive motion lightpen library added

19 views
Skip to first unread message

Bill E

unread,
Jul 14, 2026, 4:28:33 PM (7 days ago) Jul 14
to [PiDP-1]
Demo in FunStuff/Demos/Type340/fastLpDemo.am1.
This came out of my research on Sutherland's sketchpad.
It turned into a major effort involving Claude making an attempt and me throwing that all away and writing from scratch myself. AI doesn't always rock.
It filters lightpen coordinates using two exponential moving average filters, one for velocity tracking and the other a dual slope version for acceleration and
deceleration tracking, feeding a nonlinear movement predictor to get
new coordinates. No wonder stability was hard.
This lets the lightpen move much faster without losing tracking lock.

It took forever to get it stable.  Well, I found out afterwards the Sutherland tried 
the same approach and abandoned it because he couldn't get his to stay stable.
I did by adding some 'it went bonkers, get it sane again' monitors. Where's my Turing Award?

Now back to my sketchpad effort, which is even more monumental.

Bill

Paul Birkel

unread,
Jul 15, 2026, 3:58:25 AM (7 days ago) Jul 15
to [PiDP-1]
I never considered that "good" lightpen support would be this algorithmically-hard hard to implement.  I imagine that abrupt angles are problem motions and that you've incorporated some parameters that are to a degree dependent on the characteristics of muscle-bound hand motion in adults?

No Turing Award, but consider this as a vote of commendation "of the highest order" :-}.

On Tuesday, July 14, 2026 at 4:28:33 PM UTC-4 wjegr...@gmail.com wrote:
...
It filters lightpen coordinates using two exponential moving average filters, one for velocity tracking and the other a dual slope version for acceleration and deceleration tracking, feeding a nonlinear movement predictor to get new coordinates. No wonder stability was hard.
...

Bill E

unread,
Jul 15, 2026, 7:40:01 AM (7 days ago) Jul 15
to [PiDP-1]
Part 2 now checked in. T30dpy and T30dpy3 are updated to send lightpen (mouse) updates at subframe rates, needed to feed the fast lightpen lib. Updates at 30fps aren't fast enough. For you EE types, remember your signals and systems. Nyquist applies here also, that was an effective 15 updates/sec, way too slow. And I never thought this would be so complicated, either. I'm sure learning a lot.
Bill
Reply all
Reply to author
Forward
0 new messages