body { cursor: pointer; }
tt = 0;
rep = 4
document.addEventListener 'click', (e) ->
    rep = if (e.shiftKey) then 1 else 4
    draw(rep)

Z ()->
  tt++
  background "#fff", 1; stroke "#000", 0.8; noFill()

  insect = (i) ->
    a = random()
    b = random()
    c = random()
    d = random()
    e = random()
    f = random() * 0.15

    push()
    translate 0.5, 0.3 + i * 0.02
    rotate HALF_PI
    scale 1, 0.5

    para 0, 0,
      range: TWO_PI
      f: (t) ->
        r = b * cos(2 * (t)) - a * cos(t)
        x1 = abs(r * cos(t + HALF_PI)) * 2
        y1 = atan(r * sin(t * 2) )

        x2 = c * cos(t) * (1 - (2 * sin(t) ** 2))
        y2 = c * sin(t) * (1 + (2 * cos(t) ** 2))

        x: (x1 * d + x2 * e) * 0.3
        y: (y1 * d + y2 * e) * 0.3

     pop()

   repeat rep, (i) -> insect(i)
          
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://zevanrosser.com/arctype-dev/zeta/zeta-latest-3.js