
SPIRAL.BAS - GW-BASIC, spiral via 4 mirrored line-graph-curves
When I was a kid, a teacher or book showed me this really cool thing to do with graph paper: Start with two points: P1 = (0,10), and P2 = (0,0). Draw a line between them. Now move the high point P1 downwards, and move the low point P2 to the right. So P1 = (0,9) and P2 = (1,0). Draw another line. Continue until you get a flat line. You have just made this really cool looking grid, but it also created a curve at the edges.
This program was to test at the highest resolution what that curve would look like if you did it pixel by pixel. I changed my original program to have a STEP for the FOR LOOPs just to show more accurately what the program is doing. Perhaps I should have removed the coloring, to better showcase the resultant curve.
Running under GW-BASIC, Tandy mode SCREEN 5 = 320x200 with 16 colors, with the PC-BASIC emulator.
My playlists:
--------------------
- Voxel: https://youtu.be/watch?v=XCVWEuhCCDM&list=PLjnbT4UISq0bQF1g85tE9jTrKfEtdRYlY
- Road: https://youtu.be/watch?v=ck5ALX11YU4&list=PLjnbT4UISq0bnfd1RC3M4PgTgkmhlkikV
- Ray Casting 3D: https://youtu.be/watch?v=zjswXUTMP2o&list=PLjnbT4UISq0YcFtRFjFQqK0g6ONNCtrvY
- Side-Scroll Shmup: https://youtu.be/watch?v=fF4X8zN-Raw&list=PLjnbT4UISq0Y_7IAN_zUzxgZnfhXxo_0Q
- MonoGame Tutorial: https://youtube.com/watch?v=WW1dJnfXWb0&list=PLjnbT4UISq0adw__Y9B2eXA0LL35TyORU
My websites:
---------------------
- my GitHub: https://github.com/JDoucette
- my company: http://xona.com
- my Blog: http://thefirstpixel.com