3 ms·
Wanting to do my own 3D graphics after playing Elite was a strong motivator. I figured out all the rotation maths just by drawing triangles on paper and figurin
by becurious 5y ago
Wanting to do my own 3D graphics after playing Elite was a strong motivator. I figured out all the rotation maths just by drawing triangles on paper and figuring out what the angles were and therefore the formulas. You might be able to find fragments of graphics math in library books and then photocopy it - I remember reading about hidden surface removal by calculating the normals to the faces and their direction to the viewer. I know I had a rotating cube written in BASIC at some point. I don’t remember learning the cross product in school until A levels though!
My dad took the day off work to take me to the PC show at Earls Court in I think 1988. I spent my hard earned paper round money on the assembler and it massively improved my productivity.
I figured out how to do multiplies and divides on the Z80 while doing my paper round. In retrospect it was just long division but it wasn’t obvious to me at the time!
There were lots of other little math tricks that having a slow processor taught you. If you tried to draw circles by calculating sine and cosine it was too slow. Instead you rotated each point by a fixed angle and then used reflections to use that to plot eight points at a time.
All this stuff is still super useful. I drop down to look at the disassembly of x64 code all the time. Large code bases don’t scare me. You have source code! I had to disassemble games and ROMs to figure out how they worked - printing out fragments and then annotating them. The disassembler took 5KB of space so you’d have to load it in at different addresses to get at all the code.