applications.collages.collageAlgebra:
{
  ntColour = const(.8),
  ntColour2 = const(.6),
  
  d = const(11.5),
  angle = const(5),
  x1 = const(#d * sin(#angle / 2)),
  y1 = const(#d * cos(#angle / 2)),
  x2 = const(-#x1),
  y2 = const(#y1),
  x3 = const((#d - 1) * -sin(#angle / 2)),
  y3 = const((#d - 1) * cos(#angle / 2)),
  x4 = const(-#x3),
  y4 = const(#y3),
  
  p = { filledPolygon((#x1, #y1), (#x2, #y2), (#x3, #y3), (#x4, #y4)) },
  S+ = { filledPolygon((#x1, #y1), (#x2, #y2), (#x3, #y3), (#x4, #y4))
               [#ntColour2,#ntColour2,#ntColour2],
             polygon((#x1, #y1), (#x2, #y2), (#x3, #y3), (#x4, #y4))
                        },
  S = { filledPolygon((#x1, #y1), (#x2, #y2), (#x3, #y3), (#x4, #y4))
               [#ntColour,#ntColour,#ntColour],
             polygon((#x1, #y1), (#x2, #y2), (#x3, #y3), (#x4, #y4))
                        },
                        
  shrink = scale((#d - 1) / #d, (#d - 2) / (#d - 1)) . translate(0, 1 - (#d - 2) / (#d - 1)),
  shrink = < shrink >,
  shrink+ = < #p, shrink >,
  
  s0 = rotate(0 * #angle),
  s1 = rotate(1 * #angle),
  s2 = rotate(2 * #angle),
  s3 = rotate(3 * #angle),
  s4 = rotate(4 * #angle),
  s5 = rotate(5 * #angle),
  s6 = rotate(6 * #angle),
  s7 = rotate(7 * #angle),
  s8 = rotate(8 * #angle),
  45-deg = <s0, s1, s2, s3, s4, s5, s6, s7, s8 >,
  
  t0 = rotate(0),
  t1 = rotate(45),
  t2 = rotate(90),
  t3 = rotate(135),
  t4 = rotate(180),
  t5 = rotate(225),
  t6 = rotate(270),
  t7 = rotate(315),
  full = <t0, t1, t2, t3, t4, t5, t6, t7 >
    
}
