// draw a colourful mikachuball

ruleset (
   S =>
        {
         attr(color,'1 0 1) F+
         attr(color,'0 1 1) F+
         attr(color,'1 1 0) F+
         attr(color,'1 1 1) F+
        };
)

mikachuball(n) => attr (delta, 90) S,n-1;

define size 0.41;

S => [
      [S]
      attr (distance, distance * (1 - size) * 0.5)
      f+f-
      attr (distance, distance / (1 - size) / 0.5 * size)
      +(15)
      [&f&(-90)S] // roof
      [&S]f+
      [&S]f+
      [&S]f+
      [&S]
     ];

