1. Click the green flag 2. Enter the number of the picture you want to scan. 3. Wait for the picture to be scanned. Press "h" for progress. 4. Watch it get drawn using the pen. You will want to use turbo mode. NOTE: I know that I misspelled some words. Deal with it :P
The first scan is using the conventional approach of scanning one line at a time. The second scan uses clones to scan more than one line at once. This is an experiment to see if scanning an image in parallel using clones to scan more than one line at once would be faster than the conventional approach of scanning one line at a time. Short version: It isn't. In fact, it takes quite a bit longer Long version: I believe that this is because of two main factors: 1. The clones are not scanning with screen refresh on, which slows it down. If they didn't, the clones would scan one at a time, which defeats the point of having clones! 2. Scratch is having to switch between running each clone's code. This most likely takes a good bit of effort. On my laptop, the sequential scan takes ~15 seconds, and the parallel scan takes ~220 seconds. UPDATE: @Icely got the sequential scan to take 2 seconds and parallel to take 48 seconds with a i7 processor and 12 GB of RAM The scans could probably be sped up by using a lower resolution to scan less pixels. Right now it scans every pixel on the stage, and since it is 480x360, it has to check if it is touching the color white 172,800 times! by reducing the resolution to just checking the middle of a 6x6 block, and saying that the whole block is that color, we can reduce the number of <touching [color]> checks to just 4,800, or just 2.78% of the amount of work! That will be the work of another project however...