I agree, this code is really nice and beautiful like the endresult. Congrats to the author. Love this kind of computer-art. Thank you for your comment and nice to see you, Josip.
Thank you for such a detailed explanation what happens in the code. I really enjoyed your presentation ! :-) BTW I noticed two issue in the code I originally uploaded: 1) I made the mistake in the code I go first to GRAPHIC mode, then setting the colors. This is a wrong sequence from me. Your SCNCLR required because I cleared the screen with with the default colors, not the new ones. I dunno why I did not detect this... So setting first the colors, then giving the GRAPHIC1,1 command will make the SCNCLR command (you rightfully added) unnecessary. --> Even smaller code 🙂 2) I also promised a better looking star. Just made it. Not perfect, but a little better. 60 DRAW1,160,9 TO 166,23 TO 151,14 TO 169,14 TO 153,23 TO 160,9 Possible improvements: 3) I really like the dotted look of the pinetree, but if anyone wish to create more dense tree with more dots (and does not mind the slower drawing) then the STEP number need to be decreased to 0.05 or even less. It will make the drawing more dense, but will be much slower. Or can make is faster changing the STEP from 0.1 to 0.2. 4) If we would make this tree in Graphic3 mode, the horizontal resolution would drop to 160 pixels, and it requires the recalculation of the horizontal pixels. BUT if you draw the tree and the star with Color 3 (Draw3,...) after you finished the drawing, you can do a simple palette animation I mean changing the Color3 afterwards with FOR cycles, it will change the color of the full tree. (or the tree could be drawn with green Color1, and draw only the star with Color 3, and you can color cycle only the star) Thank you for the great show!
Hi MMS, i am happy you enjoy the video and for your tips and improvements. I think its important and fun to go through the whole process understandung the code. This oneliners can be intimidating at the first glance. Was a lot of fun to break the whole thing down and explain it as simple as i could. I am preparing the next video of this kind, which is more compicated. I hope i can pull this off too. Anyway, i really apreciaty your comment, my freind. Thank you for your ongoing inspiration!
Nice! Never used graphics in a C64 before as its BASIC was so damned primitive so I've just loaded BASIC 3.5 into my Ultimate 64 and tried it. Here it is in BBC BASIC minus the star: 10MODE 1:VDU 19,3,2;0;0;0; 20FOR I=0 TO 140 STEP 0.1 30PLOT 69,(I*COS(I)+320)*2,900+(I*(SIN(I)*0.4-2)*2) 40NEXT I BBC screen is 1279X1023 and the origin starts top left so had to change the formula bit to make it fit the screen more.