tail = 9; loop { for(n = get_length) { set_pixel(n-1, 0, 0, 0); }; t = get_precise_time; for(i = tail) { set_pixel((t + i) % get_length, 255 - (i * (255 / tail)), 0 ,0); }; for(i=tail) { set_pixel((t - i) % get_length, 255 - (i * (255 / tail)), 0 ,0); }; set_pixel(t % get_length, 255, 100, 50); blit; yield; }
Benchmark