![]() |
Forum Index : Microcontroller and PC projects : pointless picomite/ILI9341 demo: autumn in canada
![]() ![]() |
|||||
Author | Message | ||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2137 |
sometimes, the irrational snobberies in tech (language/CPU/Bits etc...) makes me feel like ![]() ![]() |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3994 |
That shows how google returns very different results for the same search by different people. Apparently it thinks it knows what you want but is wrong. John Edited 2021-11-27 01:42 by JohnS |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3309 |
I have to admit that I never followed this link before, but in the "Microcontroller and PC projects" section of thebackshed, under "Sticky Topics", after clicking "Micromite MMBasic Library(s)", the second link, "Community driven MMBasic wiki", takes you to fruitoftheshed, "_MMBasic Code Library" section. Clicking "All Pages" gives many entries. The second post there (just created) also has links. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
scruss Regular Member ![]() Joined: 20/09/2021 Location: CanadaPosts: 88 |
It was trivially easy to port to PicoMite VGA. The only part that required some thought was adapting it to the latter machine's limited palette. ' autumn in canada ' scruss, 2023-01 - PicoMite VGA ' a take on my https://openprocessing.org/sketch/995420 for picomite OPTION base 1 ' randomize Timer ' *** initialize polar coords of leaf polygon and colour array DIM leaf_rad(24), leaf_ang(24), px%(24), py%(24) FOR i=1 TO 24 READ leaf_rad(i) NEXT i FOR i=1 TO 24 READ x leaf_ang(i)=RAD(x) NEXT i DIM integer c%(4) FOR i=1 TO 4 READ r%, g%, b% c%(i)=RGB(r%,g%,b%) NEXT i ' *** set up some limits min_scale%=INT(MIN(MM.HRES, MM.VRES)/8) max_scale%=INT(MIN(MM.HRES, MM.VRES)/6) min_angle=-30 max_angle=30 min_x%=min_scale% min_y%=min_x% max_x%=MM.HRES - min_x% max_y%=MM.VRES - min_y% CLS TEXT MM.HRES/2, INT(MM.VRES/3), "autumn in canada", "cm" TEXT MM.HRES/2, INT(MM.VRES/2), "scruss, 2023-01", "cm" TEXT MM.HRES/2, INT(2*MM.VRES/3), "just watch ...", "cm" kt%=0 DO cx% = min_x% + INT(RND * (max_x% - min_x%)) cy% = min_y% + INT(RND * (max_y% - min_y%)) angle = min_angle + RND * (max_angle - min_angle) sc% = min_scale% + INT(RND * (max_scale% - min_scale%)) col% = 1 + INT(RND * 3) leaf cx%, cy%, sc%, angle, c%(4), c%(col%) kt% = kt% + 1 LOOP UNTIL kt% >= 1024 END SUB leaf x%, y%, scale%, angle, outline%, fill% FOR i=1 TO 24 px%(i) = INT(x% + scale% * leaf_rad(i) * COS(RAD(angle)+leaf_ang(i))) py%(i) = INT(y% - scale% * leaf_rad(i) * SIN(RAD(angle)+leaf_ang(i))) NEXT i POLYGON 24, px%(), py%(), outline%, fill% END SUB ' radii DATA 0.536, 0.744, 0.608, 0.850, 0.719 DATA 0.836, 0.565, 0.589, 0.211, 0.660, 0.515 DATA 0.801, 0.515, 0.660, 0.211, 0.589, 0.565 DATA 0.836, 0.719, 0.850, 0.608, 0.744, 0.536, 1.000 ' angles DATA 270.000, 307.249, 312.110, 353.267, 356.540 DATA 16.530, 18.774, 33.215, 3.497, 60.659, 72.514 DATA 90.000, 107.486, 119.341, 176.503, 146.785, 161.226 DATA 163.470, 183.460, 186.733, 227.890, 232.751, 270.000, 270.000 ' leaf colours DATA 255,0,0, 255,85,0, 255,170,0, 255,255,0 (and now I discover that the SD card on my PicoMite VGA doesn't seem to work, so there was a lot of copying, pasting and editing to get this text here.) |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 1192 |
![]() 'no comment |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |