Commodore 64 Basic oneliner Sinus graph
This is a simple example of a basic code oneliner for the Commodore 64 rendering a Sinus graph on the screen using just one single line of code.
The following line of code can be directly copied into the Commodore 64 Vice emulator, you need to replace the "$" by the pi sign using key combination ctrl+page-down or on the commodore the Pi key.
1fOn=0to3*$stE0.05:o=int(11*sin(n))*40+int(4.2*n)+480:pO1024+o,81:pO55296+o,1:nE
And second I share here the more readble version of the above shortend code:
10 for n=0 to 3*3.1415step0.05
20 x=int(4.2*n):y=int(11*sin(n))
25 o=y*40+x+480:poke1024+o,81:poke55296+o,1
30 next n
See more of this on my blog : [ Ссылка ]
Ещё видео!