3 ms·
Brings back memories of programming in the 70s. Stuff like that was necessary all the time. Writing your own character-plotting code on a graphics terminal; wil
by JoeAltmaier 4y ago
Brings back memories of programming in the 70s. Stuff like that was necessary all the time. Writing your own character-plotting code on a graphics terminal; wild attempts to calculate floating point (or estimate it) using every trick in the book and some you invented.
Add to that doing bit-banging on pins to simulate serial protocols with timing loops; storing things in odd places like the file buffer on a time-share system (used to run 20+ terminal sessions on a single 1MHz processor!) or the previous line on a programmable terminal (up-arrow and transmit-line to get it back).
- thefilmore 4y agoThe code also used a neat approximation to draw circles. Instead of using sin and cos for rotating along the edge of the circle to draw it, it simply used x (~= sin(x) for small values) and 1-x^2/2 (a Taylor series approximation derived from cos(x) = sqrt(1-sin(x)^2)), respectively.
- JoeAltmaier 4y agoI would draw circles using vectors. A vector normal to the last radii long enough to span about 7 degrees would sketch a circle that looked as good as round without drawing too many lines.