boxIllusion.frink

Download or view boxIllusion.frink in plain text format

/** Color optical illusion.  The horizontal lines are straight but they
    don't appear to be!
*/

g = new graphics

height = 1000
width = 700

y = 0

colors = [new color[.8,0,0], new color[.8,.8,0], new color[0,0,.8], new color[0,0,0], new color[0,0,0]]

do
{
   size = randomFloat[20, 60]
   x = 0
      g.color[random[colors]]
   do
   {
      g.fillRectSize[x,y,size,size]
      x = x + 2 size
   } while x < width
   //g.color[0, 0, 0]
   g.line[0,y,width,y]
   y = y + size
} while y < height

g.show[]


Download or view boxIllusion.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen, eliasen@mindspring.com