Una necesidad/pregunta recurrente de antaño es como dibujar de forma rapida y correcta lineas y circulos y Bresenham lo hizo cuando trabajaba para IBM basandise en Midpoint circle algorithm, y depsues aparecieron varias forks.
https://web.archive.org/web/20260414031310/https://schwarzers.com/algorithms/
https://en.wikipedia.org/wiki/Bresenham's_line_algorithm
https://en.wikipedia.org/wiki/Midpoint_circle_algorithm
100 GRAPHICS 8
110 COLOR 1
120 A=160
130 B=80
140 R=50
150 X=0
160 Y=R
170 U=0
180 V=4*Y
190 D=3-2*R
200 IF D>=0 THEN 250
210 GOTO 280
250 D=D+4-V
260 V=V-4
270 Y=Y-1
280 PLOT A+X,B+Y
290 PLOT A+X,B-Y
300 PLOT A-X,B+Y
310 PLOT A-X,B-Y
320 PLOT A+Y,B+X
330 PLOT A+Y,B-X
340 PLOT A-Y,B+X
350 PLOT A-Y,B-X
360 D=D+6+U
370 U=U+4
380 X=X+1
390 IF X<=Y THEN 200
https://forums.atariage.com/topic/306038-fast-atari-basic-circle/
https://forums.atariage.com/topic/301993-missile-command/
I've been reverse-engineering Missile Command off and on. It's one of the many on my to do list.
Rob does a similar technique of a linear question found in Activision's Laser Blast, Fishing Derby, and Pitfall!
Look at my reverse-engineering of Laser Blast. It may help.
Start looking at label .determineAttackerLaserDirection. This is where
David Crane determines the direction of the attacker laser and the
slope. Then in the kernel at .drawLeadShipKernel he uses the
tankLaserSlopeFractionValue to increment tankLaserSlopeIntegerValue.
When a carry is determined (i.e. time to increment the integer value) he
sets the HMM1 register to fine adjust the tanks laser.
Despues salio un algoritmo con antialiasing:
https://en.wikipedia.org/wiki/Xiaolin_Wu's_line_algorithm
https://manillismo.blogspot.com/2024/11/compu-programas-atari-utilitarios.html