Sierpinski Triangle written in BASIC

These files might not work on the most current version of the Commander X16, or these may be held over from the previous forum. To find previous versions of the emulator, so you can test old programs, please visit Our GitHub Page
Post Reply
NuVista175
Posts: 2
Joined: Sat Apr 17, 2021 8:37 am

Sierpinski Triangle written in BASIC

Post by NuVista175 »


At last!! The possibility to do pset ?




Just started with Commander X16 emulator today and it brings back a lot of good memories from my time with my old "bread box". I did a similar program on my old C64 back in the days but I can't remember all the POKEs and PEEKs necessary to do this in BASIC on the Commodore 64, but with this machine it's actually possible in just a few lines. 



Just updated the calculation for new X and Y-coordinates on screen. I figure it should be quicker to first add them together and then divide by 2 rather than before. At least it's less code.



SIER.PRG

Attachments
Sierpinski Triangle written in BASIC
Sierpinski Triangle written in BASIC
sier.png (36.97 KiB) Viewed 393 times
SIER.PRG
Sierpinski Triangle written in BASIC
(521 Bytes) Downloaded 97 times
Post Reply