Rule(col1,col2)=(newcol,dx,dy)
Found more things are possible just by changing the modding rules, u wont believe it but Ive managed to do moving images now, e.g. a moving space invader, just by changing the mod rules of different shades of colours (which rotate through a cycle)
Its difficult to explain but simple example- heres a spiraling green gas
Green1=RGB(0,255,0)
Green2=RGB(0,254,0)
Green3=RGB(0,253,0)
Green4=RGB(0,252,0)
Rule(Green1,Black)=(Green2,1,-1) 'change to green2 then move up&right
Rule(Green2,Black)=(Green3,-1,-1) 'change to green3 then move up &left
Rule(Green3,Black)=(Green4,-1,1) 'change to green4 and move down& right
Rule(Green4,Black)=(Green1,1,0) 'move right one
This rotation through 4 similar shades of green makes the gas move round in a small circle and end up just one pixel up!
Anyway so much can be done with just changing the modding rules.
The procedures calculatepixels and plotpixels are very short, they just add the dx and dy to the positions and change the colour and plot the point. Less than 10 lines. If we can get that bit in a fast library it will be great