Another demo added, fastCube

12 views
Skip to first unread message

Bill E

unread,
Jul 15, 2026, 12:35:21 PM (6 days ago) Jul 15
to [PiDP-1]
In FunStuff/Demos/Type340Demos. This is the earlier rotating cube with high speed tracking and some other cool stuff. I so impressed myself with this one, I have to include the comment section here:

Super-enhanced cube2 for the Type 340 that uses interrupts and predictive movement for the tracking target.
// See cube2 for the details of how the cube and its rotation are implemented.
// This version moves the lightpen hit processing to an SBS interrupt routine that is invoked
// on a lightpen hit.
// The predictive movement filters are then applied and the target moved to the new position,
// also passing the values to the cube rotation logic.
// The filter algorithm used is a exponential moving average filter for velocity, which
// then chains to a dual slope one for acceleration, one slope for acceleration, one for deceleration.
// Finally, those results are passed to a nonlinear motion predictor to give the predicted location.
// Two sets are used, one set for each axis.
// It uses integer fixed point math with only shifts, so it's quite efficient.
// The chained filters give prediction and fast compensation when the velocity changes.
//
// Additionally, since so many rotations now occur in a short time, the fixed-point cube rotation matrix
// calculations accumulate enough error that the cube distorts and falls apart.
// Or it did.
// Now a renormalization correction is periodically applied, Gram-Schmidt orthogonal renormalization.

I'm impressed with the pdp-1's ability to handle all the math in real time.
Bill
Reply all
Reply to author
Forward
0 new messages