![]() |
Forum Index : Microcontroller and PC projects : Moiree Demo
Author | Message | ||||
NorbertJ![]() Newbie ![]() Joined: 29/06/2020 Location: GermanyPosts: 6 |
Today I had some time time for programmimg. I wanted to test the graphics capabilities of my new CMM2. I wrote a small graphics program based on a program in the book of Kurt Endl 'Creative computer graphics'. When running it you are asked for a step width, I recommend 50 for the beginning... MOIREE DEMO.zip Edited 2020-07-18 03:48 by NorbertJ It all started with the Elektor Junior Computer... |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
Cool program! It generates some neat effects. Schön gemacht! Here's a slight variation that 'animates' it: cls dim integer c(7)=(rgb(black),rgb(red),rgb(green),rgb(blue),rgb(yellow),rgb(magenta),rgb(cyan),0) sw = 100 ' starting step width px = MM.HRES - 10 py = MM.VRES - 10 page write 1 do ' input "step size (1-800) (0=quit) ";sw ' if sw = 0 then end cls i = 1 t = timer for x1 = 10 to px step sw for x2 = 10 to px step sw line x1,10,x2,py,,c(i) i = i + 1 if i > 5 then i = 1 next x2 next x1 print @(10,0) sw " "; page copy 1,0,B sw = sw - 1 'pause 5000 do : loop until timer - t > 800 ' try make constant time per step loop until sw = 19 page write 0 end Visit Vegipete's *Mite Library for cool programs. |
||||
NorbertJ![]() Newbie ![]() Joined: 29/06/2020 Location: GermanyPosts: 6 |
Thank you. Nice animation you added! For me it is interesting how you shortened the code, especially the declaration part. It all started with the Elektor Junior Computer... |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |