www.main.lv
Don't think just code it

2009-11-15 Pascal Triangle

This is Pascal Triangle. And colours is chosen by reminder of division. There are 2 ways how that is made:1. Simple if division reminder is 0 then red else green2. Reminder is like alpha channel of red colour.In gallery shown images are generated by dividing on (17,19,23,41,42,43). There is easy to see that prime numbers (17,19,41,43) has very structured triangle but not prime (42) is different.

./chessboard div_number -

simply show triangle divided by number

./chessboard div image.tga -

save program screen to image.tga

./chessboard div img.tga ant_parm -

changes to second colouring type. Why it I call it chessboard? I were trying make such with OpenGL bet result is Pascal Triangle.
Source

Gallery